var request = {
QueryString : function(val) {
var uri = window.location.search;
var re = new RegExp("" +val+ "\=([^\&\?]*)", "ig");
return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null);
&n...
QueryString : function(val) {
var uri = window.location.search;
var re = new RegExp("" +val+ "\=([^\&\?]*)", "ig");
return ((uri.match(re))?(uri.match(re)[0].substr(val.length+1)):null);
&n...
本文介绍了一种使用JavaScript从当前URL中提取查询字符串参数的方法。通过正则表达式匹配的方式,能够有效地获取到URL中的特定参数值。
255

被折叠的 条评论
为什么被折叠?



