要说的是,返回的变量是字符串数组,不是字符串。例如:
var url = location.search.match(/&Location=[\w]+/i);
if(url.length == 0)
return;
var loc = url[0].replace('&Location=','');
要说的是,返回的变量是字符串数组,不是字符串。例如:
var url = location.search.match(/&Location=[\w]+/i);
if(url.length == 0)
return;
var loc = url[0].replace('&Location=','');
转载于:https://www.cnblogs.com/sungang3225/p/3809191.html