Javascript获得当前网页详细地址的代码
//设置或获取对象指定的文件名或路径。 alert(window.location.pathname) //设置或获取整个 URL 为字符串。 alert(window.location.href); //设置或获取与 URL 关联的端口号码。 alert(window.location.port) //设置或获取 URL 的协议部分。 alert(window.location.protocol) //设置或获取 href 属性中在井号“#”后面的分段。 alert(window.location.hash) //设置或获取 location 或 URL 的 hostname 和 port 号码。 alert(window.location.host) //设置或获取 href 属性中跟在问号后面的部分。 alert(window.location.search) //by www.jbxue.com
您可能感兴趣的文章:
Javascript获得当前网页详细地址的代码
Js 取得当前页面的URL网址参数
js获得当前页面的url地址(小写字母)
javascript 获取url参数的小例子
php 获取完整url地址实例详解
h5页面如何调用百度地图获取当前位置(代码)
php获取远程客户端真实ip地址
JS获取当前网址 当前域名URL 完整路径页面地址的实现代码
PHP通过IP获取地理位置的代码
js 获取当前页面的 URL 地址