如上图,ajax 提示 type is not defind !,data is not defind,url is not defind,dataType is no defind
<script type="text/javascript">
// var map = new BMap.Map("allmap");
// map.centerAndZoom("广州市", 15);
$(document).ready(function(){
$.ajax({
type: "POST",
cache: false,
data: "",
url: "/DeviceMonitor/GetPersonInfo",
dataType: "json",
success: function (data) {
var stations=JSON.stringify(data);
alert(stations);
},
error: function (XMLHttpRequest, textStatus, errorThrown) {
//这个error函数调试时非常有用,如果解析不正确,将会弹出错误框
alert(XMLHttpRequest.responseText);
alert(XMLHttpRequest.status);
alert(XMLHttpRequest.readyState);
alert(textStatus); // parser error;
}
});
// alert("跳到这啦");
})
</script>