如何从javascript获取URL数组参数 我有一个数组,例如http://localhost/search?&p[]=599
,我需要在javascript中接收599.I使用下面的函数获取不是参数array.How获取数组参数。 ?如何在javascript中获取URL数组参数
function getURLParameter(name) {
return decodeURI(
(RegExp(name + '=' + '(.+?)(&|$)').exec(location.search)||[,null])[1]
);
}