window.location.href和document.location.href、document.URL的区别
1、document表示的是一个文档对象,window表示的是一个窗口对象,一个窗口下可以有多个文档对象。
所以一个窗口下只有一个window.location.href,但是可能有多个document.URL、document.location.href
2、window.location.href和document.location.href可以被赋值,然后跳转到其它页面,document.URL只能读不能写
window.location.href和document.location.href、document.URL的区别的更多相关文章
- window.location.href 和 document.location.href
document表示的是一个文档对象,window表示的是一个窗口对象,一个窗口下可以有多个文档对象. 所以一个窗口下只有一个window.location.href,但是可能有多个document. ...
- window.location和window.location.href和document.location的关系
1,首先来区分window.location和window.location.href. window.location.href是一个字符串. 而window.location是一个对象,包含属性有 ...
- document.location.reload();与location.href='xxx'的区别
document.location.reload();会重新加载页面,onload事件会被触发. location.href='xxx'刷新页面,onload事件不会触发.
- Document.location.href和.replace的区别
转自:https://www.cnblogs.com/GT_Andy/archive/2007/10/31/1922138.html 1 Document.location.href和.replace ...
- js中的 window.location、document.location、document.URL 对像的区别(转载)
原文:http://www.cr173.com/html/18417_1.html 当我们需要对html网页进行转向的时候或是读取当前网页的时候可以用到下面三个对像: window.location. ...
- window.location和document.location的区别分析
用户不能改变document.location(因为这是当前显示文档的位置).但是,可以改变window.location (用其它文档取代当前文档)window.location本身也是一个对象,而 ...
- document.location window.location
document.location 和 window.location 取url的值的时候可以通用,但是 document是window的属性,所以不能直接用document.location =ur ...
- ☀【document / location】
<!DOCTYPE html> <html lang="zh-CN"> <head> <meta charset="utf-8& ...
- document.location的属性
示例html完整路径为: http://10.10.3.117:8500/html/ypt/index.html alert("document.location.href:"+d ...
随机推荐
- scsi线
- laravel 5.1 的程序性能优化(配置文件)
命令优化 本文的目的是来弄清楚一些优化命令在 Laravel 5.1 和之前版本之间的差别. 在 15年6月发布的 Laravel 5.1版本中, 命令和他们的逻辑方法被清理掉, 本文章就是描述这些不 ...
- java.lang.UnsatisfiedLinkError: No implementation found for int com.xxx.xx中的couldn’t find “XX.so”或loadLibrary("xxx")失败
我觉得这是个神坑,虽然早几年网上就很多po出来的解决方式,但是同样的问题,我的bug却稳如泰山,一点用都没有,好气 下面总结一下 这里前面先是有个系统打印信息 I/System.out: loadLi ...
- 如何查询表A中的某字段的值在表B中不存在?
1.测试表创建,插入数据: create table a (id int, name )); create table b (id int); ,'a'); ,'b'); ,'c'); ,'d'); ...
- selenium测试(Java)--告警框处理(十四)
下面代码中介绍了告警框的处理方法 package com.test.alerthandle; import org.openqa.selenium.By; import org.openqa.sele ...
- Android isUserAMonkey()
Monkey是Android上的一个自动化测试工具.产生随机事件由于压力测试等. ActivityManager.isUserAMonkey()判断当前是否有运行的Monkey测试.有就返回true. ...
- AngularJS开发经验
AngularJS是为了克服HTML在构建应用上的不足而设计的.HTML是一门很好的为静态文本展示设计的声明式语言,但要构建WEB应用的话它就显得乏力了.所以我做了一些工作(你也可以觉得是小花招)来让 ...
- php -- php控制linux关机、重启、注销
php 里面有个 system(exec) 方法, 可以调用系统命令. 重启先建立一个脚本(比喻 /root/reboot_server.sh ),重启用的.//路径可随便,但最少必须 ...
- html style的width不起作用
一. 有些元素的默认情况下没有长度属性的,所以在其style内指定width属性是不会起作用的. 应对措施:使其浮动,float:left/right,浮动的元素长度和宽带都默认是0的,需要指定长度和 ...
- VirtualBox 配置虚拟网卡(桥接),实现主机-虚拟机网络互通
记录下VirtualBox 配置虚拟网卡(桥接),实现主机-虚拟机网络互通过程,网上搜出来的比较乱,讲的不明不白,因此根据自己弄过一次,确认可行的方式,做个备份,方便日后查阅. 环境: 在Oracle ...