|
我现在的代码时这样的 我要怎样做才能把它加载到data组件里面呢???
Model.prototype.button1Click = function(event){
$.support.cors = true;
$.ajax({
"async" : "true",
"url": "http://localhost:9001/OnlineSer.asmx/GetRemotTaskJSONTest",
"type": "post",
"dataType": "json",
//"contentType": 'application/json', 此处不能要
//"data": {"a":"2",
// "b":"3"},
"complete": function (xhr) {
alert(xhr.status);
if (xhr.readyState == 4 && xhr.status == 200) {
//altert(options.success.call(this, xhr.responseJSON, xhr));
alert(xhr.responseText);
//console.log(xhr.responseText);
}
else{
alert("fail");
}
}
});
};
用ajax读出来的json数据是这样的 用不用在解析一下
{Table: [{FID: 1, FCode: "410711", FName: "司机A", FSex: "男", FPhone: "132131133", FWeChat: "",…},…]}
|
|