By Using jQuery
var params = "{'id':'123','name':'josh'}";
$(document).ready(function()
{
$.ajax({
type: "POST",
url: "/WebService/aspnet_service.asmx/getUserInfoFunc",
data: params,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg)
{
alert(msg.d);
}
,
error: function(result)
{
alert(result.status + ":" + result.statusText);
}
});
});
var params = "{'id':'123','name':'josh'}";
$(document).ready(function()
{
$.ajax({
type: "POST",
url: "/WebService/aspnet_service.asmx/getUserInfoFunc",
data: params,
contentType: "application/json; charset=utf-8",
dataType: "json",
success: function(msg)
{
alert(msg.d);
}
,
error: function(result)
{
alert(result.status + ":" + result.statusText);
}
});
});
No comments:
Post a Comment