} www.ossforge.com
catch(e){}
中国开源社区
}
} www.ossforge.com
} www.ossforge.com
function fillGrid_Change() 中国开源社区
{ 中国开源社区
if(xmlhttp.readyState==4&&xmlhttp.status==200) 中国开源社区
{ www.ossforge.com
//var rows=xmlhttp.responseXML. 中国开源社区
// selectNodes(".//TahaSchema//TahaTable"); www.ossforge.com
var row = xmlhttp.responseXML.selectNodes(".//"); 中国开源社区
ph.innerHTML = row[1].text; 中国开源社区
} www.ossforge.com
} 中国开源社区
function goToPage(pageIndex){
fillGrid(ph.id,fillGrid_Str_SQL,pageIndex)
} www.ossforge.com
中国开源社区
function goToNextPage(){
中国开源社区
try{ www.ossforge.com
fillGrid(ph.id,fillGrid_Str_SQL,
中国开源社区
parseInt(currentPageIndex) 1); 中国开源社区
return false;
www.ossforge.com
}
catch(e){ www.ossforge.com
return true; 中国开源社区
}
}
www.ossforge.com
function goToPrevPage(){
fillGrid(ph.id,fillGrid_Str_SQL, www.ossforge.com
parseInt(currentPageIndex)-1) 中国开源社区
}
www.ossforge.com
最后就是显示数据的html页面,实例代码如下: 中国开源社区
AjaxGrid.html:
中国开源社区
<html>
www.ossforge.com
<head> www.ossforge.com
<title>AjaxGrid</title> 中国开源社区
<script language="javascript" 中国开源社区
type="text/javascript" ></script> www.ossforge.com
</head> 中国开源社区
<body myPH','select * from sales',1)"> www.ossforge.com
<form method="post" runat="server"> www.ossforge.com
<div ></div>
中国开源社区
</form>
中国开源社区
</body> 中国开源社区
</html>

