您正在使用 IPV4 [18.97.9.172] 访问本站,您本次已经查看了 1 页
用户名: 密 码: 验证码:     用QQ登录本站
首页 软件 编程 笑话 知识 公告 台风 日历 计算器
[公益]保护绿色环境,构建和谐社会      

【腾讯云】2核2G云服务器新老同享 99元/年,续费同价,云服务器3年机/5年机限时抢购,低至 2.5折      
[公益] 地球是我家,绿化靠大家      
2025年 情人节 001
2025年 高 考 114
2026年 元 旦 322
2026年 春 节 369
 
您现在的位置:首页 >> 脚本代码 >> 内容
本类新增
本类热门
JS获取当前URL的示例代码
内容摘要: tablewidth=100%cellpadding=0cellspacing=0border=0scriptlanguage='javascript'thisURL=document.URL;thisHREF=document.location.href;thisSLoc=self.location.href;thisDLoc=document.locat......
<tablewidth=100%cellpadding=0cellspacing=0border=0>

<scriptlanguage="javascript">

thisURL=document.URL;

thisHREF=document.location.href;

thisSLoc=self.location.href;

thisDLoc=document.location;

strwrite="<tr><tdvalign=top>thisURL:</td><td>["+thisURL+"]</td></tr>"

strwrite+="<tr><tdvalign=top>thisHREF:</td><td>["+thisHREF+"]</td></tr>"

strwrite+="<tr><tdvalign=top>thisSLoc:</td><td>["+thisSLoc+"]</td></tr>"

strwrite+="<tr><tdvalign=top>thisDLoc:</td><td>["+thisDLoc+"]</td></tr>"

document.write(strwrite);

</script>

thisDLoc=document.location;<BR>

thisURL=document.URL;<BR>

thisHREF=document.location.href;<BR>

thisSLoc=self.location.href;<BR>

<scriptlanguage="javascript">

thisTLoc=top.location.href;

thisPLoc=parent.document.location;

thisTHost=top.location.hostname;

thisHost=location.hostname;

strwrite="<tr><tdvalign=top>thisTLoc:</td><td>["+thisTLoc+"]</td></tr>"

strwrite+="<tr><tdvalign=top>thisPLoc:</td><td>["+thisPLoc+"]</td></tr>"

strwrite+="<tr><tdvalign=top>thisTHost:</td><td>["+thisTHost+"]</td></tr>"

strwrite+="<tr><tdvalign=top>thisHost:</td><td>["+thisHost+"]</td></tr>"

document.write(strwrite);

</script>

thisTLoc=top.location.href;<BR>

thisPLoc=parent.document.location;<BR>

thisTHost=top.location.hostname;<BR>

thisHost=location.hostname;<BR>

<scriptlanguage="javascript">

tmpHPage=thisHREF.split("/");

thisHPage=tmpHPage[tmpHPage.length-1];

tmpUPage=thisURL.split("/");

thisUPage=tmpUPage[tmpUPage.length-1];

strwrite="<tr><tdvalign=top>thisHPage:</td><td>["+thisHPage+"]</td></tr>"

strwrite+="<tr><tdvalign=top>thisUPage:</td><td>["+thisUPage+"]</td></tr>"

document.write(strwrite);

</script><tr><td>

版权声明:本内容来源于网络,如有侵犯您的版权,请联系站长,本站收到您的信息后将及时处理。
上一篇:JS数组的常用10种方法详解

 

下一篇:JavaScript canvas绘制动态圆环进度条

发布日期:2023/12/14
手机扫二维码直达本页
发布时间:15:56:15
点  击:17
录  入:星儿
相关文章
Baidu
YiJiaCMS 7.5.6 build250130(MSSQL) 闽ICP备05000814号-1
本空间由腾讯云(轻量应用服务器)提供,创宇云安全提供加速防护
运行时间载入中.....
知道创宇云安全