jQuery 分页问题?
<script type="text/javascript">
var orderby="";
$().ready(function() {
InitData(0);
$("#pageTheme").change(function(){
$("#Pagination").attr('class',$(this).val());
});
});
function InitData(pageindx)
{
var tbody = "";
$.ajax({
type: "POST",//用POST方式传输
dataType:"json",//数据格式:JSON
url:'/Common/Handler.ashx',//目标地址
data:"p="+(pageindx+1)+"&orderby="+orderby,
beforeSend:function(){$("#divload").show();$("#Pagination").hide();},//发送数据之前
complete:function(){$("#divload").hide();$("#Pagination").show()},//接收数据完毕
success:function(json) {
alert(json);//测试接收不到
alert(json.Products);//测试接收不到
alert(json.ErrorInt);//测试接收不到
.......
public class Handler : IHttpHandler {
public void ProcessRequest (HttpContext context) {
string str = "{'Products':'koko','ErrorInt':'1'}";
context.Response.ContentType = "text/plain";
context.Response.Write(str);//返回给success函数
......我朋友在08里面可以的,我在05里面success函数就是接收不到服务器返回的数据,搞了一天了搞不定,请教大家 谢谢!