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 ...
随机推荐
- 课后作业——用lastIndexOf判断是否是字符串的最后一位
package test; public class Testlianxi { public static void main(String[] args) { //判断fgh是否是字符串的最后一位 ...
- yii的一些方法的解析和blog的详细解析
1. 存取数据库方法存储第一种(SAVE )存表时候用到 例子: $post=new Post;$post->title='sample post';$post->content='c ...
- Hibernate- QBC离线查询
package com.gordon.test; import java.util.List; import org.hibernate.Criteria; import org.hibernate. ...
- [svn] 在线安装
SVN地址:http://subclipse.tigris.org/update_1.6.x/
- ADT下载地址(含各版本)
2015/05/07 新增 ADT-23.0.6.zip2015/01/18 新增(未测试,不知下载过程中是否有问题,请网友自行测试,最好能把测试结果告知,谢谢)ADT-23.0.3.zipADT ...
- Android.mk文件c++头文件包含问题
Eclipse 中 Android.mk文件c++头文件包含问题 jni中的目录结构如下: 编译找不到头文件 LOCAL_PATH := $(call my-dir)LOCAL_C_INCLUDES ...
- 关于多层for循环迭代的效率优化问题
关于多层for循环迭代的效率优化问题 今天笔试的时候遇到这么一道题目 说有上面这么循环嵌套 .问怎么优化 并说明原因. for(int i = 0 ; i < 1000 ;i++){ ...
- yii2的Console定时任务创建
Yii2的定时任务可以有两种写法,原理都是通过服务器的定时任务去调用 1.通过调用指定的URL访问 就相当于在浏览器中访问 2.通过console调用 下面我们就来说说Console 是如何实现定时任 ...
- 解决error: Your local changes to the following files would be overwritten by merge
在项目里我们一般都会把自己第一次提交的配置文件忽略本地跟踪 1 [Sun@webserver2 demo]$ git update-index --assume-unchanged <filen ...
- iOS 使用AFNetworking 设置cookie
本问题是由于多账号访问统一服务器时, 由于服务器那边接收到sessionid一样, 故无法区分账号信息. 所以需要在移动端请求的时候重新设置cookie, 步骤如下: 1. 在登录的时候, 先将 re ...