JavaScript 中document.URL 和 [removed].href 的区别

时间:2015-07-06 11:24:42
【文件属性】:
文件名称:JavaScript 中document.URL 和 [removed].href 的区别
文件大小:21KB
文件格式:DOC
更新时间:2015-07-06 11:24:42
document.URL、[removed].href 实际上,document 和 window 这两个对象的区别已经包含了这个问题的答案。 document 表示的是一个文档对象,window 表示一个窗口对象。 一个窗口下面可以有很多的document对象。每个document 都有 一个URL。 但是,这不是所有的区别。当你ctrl + F5 一个链接 http://yourhost.com/#fragment 打印 alert(document.URL ); 和 alert([removed].href); 发现,这两个的值不一样,

网友评论