window.location.hash 使用
【转】http://www.cnblogs.com/nifengs/p/5104763.html location是javascript里边管理地址栏的内置对象,比如location.href就管理 ...
【转】http://www.cnblogs.com/nifengs/p/5104763.html location是javascript里边管理地址栏的内置对象,比如location.href就管理 ...
<script> //设置或获取 href 属性中跟在问号后面的部分。 console.log(window.location.search)//设置或获取对象指定的文件名或路径co ...
一、 通过window.location获取各项参数 1、获取页面完整的url url = window.location.href; 2、获取页面的域名 host = window.location.host; host2=document.domain; 应用 ...
今天在码代码的时候遇到个问题:html里采用onclick事件来实现window.location = url的跳转,在内嵌元素上又加上了href="javascrit:;"的属性。这时这句window.location的跳转失效了。后来上网查了下,想起javascript里面事件是冒泡传递的事 ...