面我们举例一个URL,然后获得它的各个组成部分:http://i.cnblogs.com/EditPosts.aspx?opt=1 1.window.location.href(设置或获取整个 URL 为字符串) var test = window.location.href;alert(test);返回:http://i.cnblogs.com/EditPosts.aspx?opt=1 2.window.location.protocol(设置或获取 URL 的协议部分) var test =
在写RewriteRule准备匹配url中的问号及后面的参数时,怎么弄都无法成功.正则的写法经过测试是正确的,问号也已经转义\?,可还是不行. 百度查询了下,RewriteRule 不会去匹配问号?后面的字符串,如下: QSA|qsappend When the replacement URI contains a query string, the default behavior of RewriteRule is to discard the existing query string,
javaScript获取url问号后面的参数方法 function GetRequest() { var url = location.search; //获取url中"?"符后的字串 var theRequest = new Object(); if (url.indexOf("?") != -1) { var str = url.substr(1); strs = str.split("&"); for(var i = 0; i &l