打开新页面:window.location.href = "./index.html?id=1"获取携带值: function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { //判断是否含有'?' var str = url.substr(1); //从字
/** * 方法说明:通过url参数键值名称获取参数的值 * @method getQueryString * @param name 要获取的参数键值 * @return * @remark */ var getQueryString=function(name){ try { var reg = new RegExp("(^|&)"+ name +"=([^&]*)(&|$)"); var r = window.location.sear