JS 获取URL参数
function getUrlParm(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"), r = window.location.search.substr(1).match(reg); if (r != null) return unescape(r[2]); return null; }
eg:
http://www.abc.com/index?parname=1234567
console.log(getUrlParm(parname));
output:
1234567