搜索

首页  >  问答  >  正文

javascript - 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"]);

迷茫迷茫2774 天前672

全部回复(0)我来回复

暂无回复
  • 取消回复