
我想把这个URL 输出到
以下代码中的(当前页URL)
可以这样:
var url=windowlocationhref;documentwriteln(" <form action=\"{fy:dir}user\/CheckloginaspAction=LoginCheck&oldurl="+url+"\" method=\"post\" class=\"simform ulogin\">");
获取的方法如下:
1、设置或获取整个 URL 为字符串: windowlocationhref
2、设置或获取与 URL 关联的端口号码: windowlocationport
3、设置或获取 URL 的协议部分 windowlocationprotocol
4、设置或获取 href 属性中跟在问号后面的部分 windowlocationsearch
5、获取变量的值(截取等号后面的部分)
6、设置或获取 URL 的协议部分: windowlocationprotocol
7、设置或获取 href 属性中在井号“#”后面的分段: windowlocationhash
8、设置或获取 location 或 URL 的 hostname 和 port 号码: windowlocationhost
下面为使用JS获取MAC地址、IP地址及主机名的方法:
复制代码代码如下:
<html>
<head>
<title></title>
<meta >
以上就是关于JS 调用当前页面url全部的内容,包括:JS 调用当前页面url、js中如何获取前一个页面的url、JS获取几种URL地址的方法等相关内容解答,如果想了解更多相关内容,可以关注我们,你们的支持是我们更新的动力!
欢迎分享,转载请注明来源:内存溢出
微信扫一扫
支付宝扫一扫
评论列表(0条)