js获取url参数值的方法有很多,下面也为大家介绍两种. 方法一:正则分析法 function getQueryString(name) { var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i"); var r = window.location.search.substr(1).match(reg); if (r != null) return u…
用过的封装好的js获取url问号后的参数的方法: <script> var Request = new Object(); Request = GetRequest();var error;error = Request['error']; function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.i…