$("#btnHelloWorld").click(function(){
$.ajax({
type: "POST",
contentType:"application/json",
url:"WebService1.asmx/HelloWorld",
data:"{}",
dataType:'json',
success:function(result){
alert(result.d);
}
});
}); 上面这段代码中,取得的result,后面那个.d是什么意思?!查阅了很多资料也没搞明白
服务器端是:
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}麻烦帮忙解释一下,谢谢!
$.ajax({
type: "POST",
contentType:"application/json",
url:"WebService1.asmx/HelloWorld",
data:"{}",
dataType:'json',
success:function(result){
alert(result.d);
}
});
}); 上面这段代码中,取得的result,后面那个.d是什么意思?!查阅了很多资料也没搞明白
服务器端是:
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}麻烦帮忙解释一下,谢谢!
如果现在我返回的是个数组,又会是怎样的效果呢?