小白:ajax跳不进success
------------------JS------------------
$(document).ready(function () {
$.ajax({
url: "WorkStaffJson.json",
type: "post",
dataType: "json",
success: function (wsjson) { //跳不进来,应该是返回值为空
alert("成功");
},
error: function (wsjson) { //跳的这一步
alert(wsjson);
}
})
})
------------------------JSON-----------------
{
"wsjson": [
{ "wpid": "david", "wpname": "乔峰", "wprole": "北乔峰" },
{ "wpid": "lau", "wpname": "慕容复", "wprole": "男慕容" }
]
}