摘要:
/** window.location.search获取url地址?以后的值 获取url参数有两种方法,第一种如下,第二种是通过正则*///基本版function getParam() {var url = window.location.search.slice(1);var arrUrl = url.split("&");var obj = {};for(var k in arrUrl){var re = arrUrl[k].split("=");obj[re[0]] = re[1];}return obj;}//调用:var param = 阅读全文