Grid 查询方法

方法一:
function f_search()
{
	var userName = $("#userName").val();
	var grid = $("#maingrid").ligerGrid();	
	grid.options.url = "/User/selectUser.dhtml?userName=" + userName;
        grid.changePage('first');
        grid.reload();
}

方法二:
function f_search()
{
	var userName = $("#userName").val();
	var grid = $("#maingrid").ligerGrid();		
 	grid.options.url="/User/selectUser.dhtml";
 	grid.options.parms=[{name:"userName",value:userName}];
 	grid.options.newPage=1;
 	grid.loadServerData(grid.options.parms);
}

你可能感兴趣的:(grid)