标签:
var cableProjectAddressBList = [];
function getCableProjectAddressBList(cableTypeCode, cableId, cableAPositionName) {
cableAPositionName = encodeURIComponent(cableAPositionName);
if (cableTypeCode && cableId && cableAPositionName) {
$.ajax({
dataType: "json",
url: "ajax.aspx",
data: {
operationType: ‘getCableProjectAddressBList‘,
cableTypeCode: cableTypeCode,
cableId: cableId,
cableAPositionName: cableAPositionName
},
success: function (data, textStatus, jqXHR) {
// 如果重新声明对象那么,外部的cableProjectAddressBList不会被改变,疑惑中
//cableProjectAddressBList = [];
cableProjectAddressBList.length = 0;
for (var i in data) {
cableProjectAddressBList.push(data[i].Address);
}
}
});
}
}
标签:
原文地址:http://www.cnblogs.com/MorZe/p/4260941.html