标签:keyword doc word bst path arch search else comment
文章链接:http://www.cnblogs.com/hongmaju/p/5510988.html
查看信息可以在控制台输出(tab或者右移补全):
如:document.URL window.location.pathName
获取url中的参数:
javascript方法:
function
getUrlParam(name) {
var
reg =
new
RegExp(
"(^|&)"
+ name +
"=([^&]*)(&|$)"
);
//构造一个含有目标参数的正则表达式对象
var
r = window.location.search.substr(1).match(reg);
//匹配目标参数
if
(r !=
null
)
return
unescape(r[2]);
return
null
;
//返回参数值
}
(
function
($) {
$.getUrlParam =
function
(name) {
var
reg =
new
RegExp(
"(^|&)"
+ name +
"=([^&]*)(&|$)"
);
var
r = window.location.search.substr(1).match(reg);
if
(r !=
null
)
return
unescape(r[2]);
return
null
;
}
})(jQuery);
if(/local.*:8888/ig.test(url)){
url = "http://local"+type+".xxxx.com:8888/index.html"
}else{
url = "http://"+type+".xxxx.com/index.html"
}
标签:keyword doc word bst path arch search else comment
原文地址:http://www.cnblogs.com/doinbean/p/7425050.html