1. 从输出结果上,document.URL 和 windows.location.href 没有区别。
2. 非要说区别的话,你只可以读取document.URL的值,不能修改它。windows.location.href的值你即可以读取也可以修改。
3. windows.location.href是旧的写法,新的标准推荐用document.URL替代。(如果你只是读取的话)

document.URL 和 windows.location.href的区别的更多相关文章

  1. JS 中document.URL 和 windows.location.href 的区别

    实际上,document 和 windows 这两个对象的区别已经包含了这个问题的答案. document 表示的是一个文档对象,windows 表示一个窗口对象.  一个窗口下面可以有很多的docu ...

  2. JS 中document.URL 和 window.location.href 的区别

    实际上,document 和 window 这两个对象的区别已经包含了这个问题的答案. document 表示的是一个文档对象,window 表示一个窗口对象. 一个窗口下面可以有很多的documen ...

  3. document.URL vs window.location.href All In One

    document.URL vs window.location.href All In One document.URL 与 window.location.href 两者有啥区别 document. ...

  4. js实现网页防止被iframe框架嵌套及几种location.href的区别

    首先我们了解一下几种location.href的区别简单的说:几种location.href的区别js实现网页被iframe框架功能,感兴趣的朋友可以了解下 首先我们了解一下:window.locat ...

  5. JS中 window.location 与window.location.href的区别

    疑惑:window.location='url'  与window.lcoation.href='url'效果一样,都会跳转到新页面,区别在哪?查得的资料如下: 1:window.location是页 ...

  6. response.redirect 与location.href 的区别

    最近做项目时发现,先弹出提示框,再跳转页面 这样写:Jscript.Alert("你好,Hello!"); Response.Redirect("/index.aspx& ...

  7. 【JavaScript】获取当前页的URL与window.location.href

    原文:http://blog.csdn.net/yongh701/article/details/45688743 版权声明:本文为博主原创文章,未经博主允许欢迎乱转载,标好作者就可以了!感谢欣赏!觉 ...

  8. window.location.replace和window.location.href的区别

    简单说说:有3个jsp页面(1.jsp,  2.jsp,  3.jsp). 进系统默认的是1.jsp ,当我进入2.jsp的时候, 2.jsp里面用window.location.replace(&q ...

  9. url 、src 、href 的区别

    url.href.src 详解 现自己居然没把url.href.src关系及使用搞清楚,今天就理一下.主要包括:url.src.href定义以及使用区别. URL(Uniform Resource L ...

随机推荐

  1. 缩点【洛谷P1262】 间谍网络

    [洛谷P1262] 间谍网络 题目描述 由于外国间谍的大量渗入,国家安全正处于高度的危机之中.如果A间谍手中掌握着关于B间谍的犯罪证据,则称A可以揭发B.有些间谍收受贿赂,只要给他们一定数量的美元,他 ...

  2. kuangbin专题十六 KMP&&扩展KMP HDU3347 String Problem(最小最大表示法+kmp)

    Give you a string with length N, you can generate N strings by left shifts. For example let consider ...

  3. kuangbin专题十二 HDU1087 Super Jumping! Jumping! Jumping! (LIS)

    Super Jumping! Jumping! Jumping! Time Limit: 2000/1000 MS (Java/Others)    Memory Limit: 65536/32768 ...

  4. Qt 学习之路 2(15):标准对话框 QMessageBox

    Qt 学习之路 2(15):标准对话框 QMessageBox  豆子  2012年9月18日  Qt 学习之路 2  40条评论 所谓标准对话框,是 Qt 内置的一系列对话框,用于简化开发.事实上, ...

  5. csv HTTP简单表服务器

    HTTP Simple Table Server Download Performance testing with JMeter can be done with several JMeter in ...

  6. The requested profile "account" could not be activated because it does not exist 无法maven install的 解决办法,勾选红框选择的选项即可

  7. JDBC常用套路

    1.连接数据库.使用查询功能 //1.获取数据库连接 Connection con=JDBCTools.getConnection(); String sql="select * from ...

  8. sharepoint_study_13

    描述: 解决: 1.修改了密码和账户,找到对应的应用程序池,修改用户名和密码,重启iis. 2.站点上安装的产品(如:工作流)启动需要用户名和密码,找到对应的服务,修改用户名和密码并重启该服务.

  9. windows_study_3

    描述:如何解决hyper-v全屏不能自适应屏幕大小? 解决:调节虚拟机的分辨率.

  10. Camtasia Studio 8卸载不了解决方法

    Win7:%ProgramData%\TechSmith\Camtasia Studio 8\RegInfo.iniWinXP:”%AllUsersProfile%\Application Data\ ...