62,243
社区成员




[WebMethod]
public string HelloWorld()
{
return "HelloWorld";
}
[WebMethod(EnableSession=true)]
public void AddSchool()
{
Response.Clear();
Response.Write("要输出的状态码");
Response.End();
}
function helloWorld(){
$.ajax({
type:"post",
//contentType:"application/x-www-form-urlencoded",
url:"/Insert.asmx/HelloWorld",
data:"",
dataType:"text",
success:function(result){
alert(result);
}
});
}
function addSchool(){
$.ajax({
type:"post",
url:"/Insert.asmx/HelloWorld",
data:"",
dataType:"text",
success:function(result){
alert(result);
}
});
}
function addSchool(){
$.ajax({
type:"post",
url:"/Insert.asmx/AddSchool",//上面的错误,此处更正
data:"",
dataType:"text",
success:function(result){
alert(result);
}
});
}