js获取地址栏的参数
//获取url参数 window.getParam = function(url, id) { url = url+ ""; var regstr = "/(\\?|\\&)" + id + "=([^\\&]+)/"; var reg = eval(regstr); var result = url.match(reg); if (result && result[2]) { return result[2]; }else{ return '' } }
//获取url参数 window.getParam = function(url, id) { url = url+ ""; var regstr = "/(\\?|\\&)" + id + "=([^\\&]+)/"; var reg = eval(regstr); var result = url.match(reg); if (result && result[2]) { return result[2]; }else{ return '' } }