62,266
社区成员
发帖
与我相关
我的任务
分享
//经过测试没问题
//请确定你的Handler1.ashx页面的路径
//或是检查WebService是否正确
//请去掉下面俩句测试
//[WebService(Namespace = "http://tempuri.org/")]
//[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
function doAjax_XML()
{
$.ajax({
url:'Ajax/Handler.ashx',
type:'POST',
dataType:'text',
data: "meth=load",
error:function(x){alert(x.status);},
success:function(data){alert(data);}
});
}

$.ajax({
type: "Post",
url: "handler.ashx",
datatype: "text",
// data://
beforeSend: function(XMLHttpRequest) {
},
success: function(msg) {
alert("123");
alert(msg);
},
complete: function(XMLHttpRequest, textStatus) {
//dosomething
}
});