Request = {
QueryString : function(item){
var sValue = location.search.match(new RegExp("[\?\&]" + item + "=([^\&]*)(\&?)","i"));
return sValue ? sValue[1] : sValue;
}
}
function showcss(){
// window.alert(Request.QueryString("ServiceTag"));
if(Request.QueryString("ServiceTag")!=null)
{
var str=Request.QueryString("ServiceTag");
document.getElementById(str).className="curr";
}
else
{
document.getElementById("all").className="curr";
}
}
js中使用正则取url
最新推荐文章于 2024-03-30 08:32:52 发布