JQuery, $.getJSON 没反应,为毛啊
functionsaveprovinceWL(){varprovinceName=$("#txtprovince").attr("value");varbdary=new...
function saveprovinceWL() {
var provinceName = $("#txtprovince").attr("value");
var bdary = new BMap.Boundary();
bdary.get(provinceName, function (rs) { //获取行政区域
//map.clearOverlays(); //清除地图覆盖物
var ch = [];
var count = rs.boundaries.length; //行政区域的点有多少个
for (var i = 0; i < count; i++) {
ch[i] = rs.boundaries[i];
}
str = ch.toString();
$.getJSON("/ElectronicFence/SaveProvinceWL", { parameter1: str, parameter2: provinceName }, function (data) {
if (data == 0) {aaa
deFlage = 1;
alert("更新失败,请检查围栏名!");
} else {
deFlage = 0;
alert("更新成功!");
}
});
});
} 展开
var provinceName = $("#txtprovince").attr("value");
var bdary = new BMap.Boundary();
bdary.get(provinceName, function (rs) { //获取行政区域
//map.clearOverlays(); //清除地图覆盖物
var ch = [];
var count = rs.boundaries.length; //行政区域的点有多少个
for (var i = 0; i < count; i++) {
ch[i] = rs.boundaries[i];
}
str = ch.toString();
$.getJSON("/ElectronicFence/SaveProvinceWL", { parameter1: str, parameter2: provinceName }, function (data) {
if (data == 0) {aaa
deFlage = 1;
alert("更新失败,请检查围栏名!");
} else {
deFlage = 0;
alert("更新成功!");
}
});
});
} 展开
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询