js获取的url参数的值怎么显示在arcgis server地图上?
js获取url参数, 怎么调用它,显示在地图上呢?
var urlParams;
(window.onpopstate = function() {
var match,
pl = /+/g,
search = /([^&=]+)=?([^&]*)/g,
decode = function(s) {
return decodeURIComponent(s.replace(pl, " "));
},
query = window.location.search.substring(1);
urlParams = {};
while (match = search.exec(query))
urlParams[decode(match[1])] = decode(match[2]);
})();
//urlParams的结果
urlParams = {
TextString: "1B024"
}
console.log(urlParams["TextString"]);
扇贝小天使
10 years, 6 months ago