var a = location.href.indexOf("?");
var otherkey;
if(a>0)
{
otherkey = location.href.substring(a+1,location.href.length);
}
else
{
otherkey = "";
}
document.write(otherkey);
例子: index.html?&time=1508924608998&isAppClient=1005
结果:&time=1508924608998&isAppClient=1005
location.href.indexOf
最新推荐文章于 2024-10-16 16:36:43 发布