52,797
社区成员
发帖
与我相关
我的任务
分享
$(document).ready(function () {
var val = { 'students': [{ 'name': 'KoBe ', 'sex': 'boy', 'age': '20' }, { 'name': 'Mary', 'sex': 'girl', 'age': '19'}] };
var aToStr = JSON.stringify(val);
$.ajax({
url: "AppInterface/API.asmx/HelloWorld",
type: "POST",
dataType: "json",
contentType: "application/json; charset=utf-8",
data: aToStr,
beforeSend:function() {alert("before");},
success: function (json) {
alert("f");
},
error: function (x, e) {
alert("error");
}
});
})