window.location.href = window.location.href window.location.reload()
w
0-会议预订提交了预订日期,预订成功后默认显示仅显示当前日期的新页面若显示预定日的信息,则可以对预定日存入cookie;
http://stackoverflow.com/questions/2405117/difference-between-window-location-href-window-location-href-and-window-location
"
If I remember correctly, window.location.reload()
reloads the current page with POST data, while window.location.href=window.location.href
does not include the POST data.
As noted by @W3Max in the comments below, window.location.href=window.location.href
will not reload the page if there's an anchor (#) in the URL - You must use window.location.reload()
in this case.
Also, as noted by @Mic below, window.location.reload()
takes an additional argument skipCache
so that with using window.location.reload(true)
the browser will skip the cache and reload the page from the server. window.location.reload(false)
will do the opposite, and load the page from cache if possible.
"
window.location.href = window.location.href window.location.reload()的更多相关文章
- JavaScript BOM-11-BOM的核心-window对象; window对象的控制,弹出窗口方法; 超时调用; 间歇调用; location对象常用属性; 位置操作--location.reaplace,location.reload(); BOM中的history对象; Screen对象及其常用属性; Navigator对象;
JavaScript BOM 学习目标 1.掌握什么是BOM 2.掌握BOM的核心-window对象 3.掌握window对象的控制.弹出窗口方法 什么是bom BOM(browser object ...
- top.location.href和localtion.href有什么不同
top.location.href=”url” 在顶层页面打开url(跳出框架) self.location.href=”url” 仅在本页面打开url地址 pare ...
- location.href 本窗口与window.open 新窗口打开用法
二种新窗口打开的区别: window.open("URL",'top'); 只是表示打开这个页面,并不是打开并刷新页面: window.location.href="UR ...
- ;(function( $, window, undefined ){ }(jQuery,window))为何需要往里面传$,window,undefined这些参数
(function( $, jQuery , undefined ) {})(jQuery); 为什么要将window和undefined作为参数传给它? 因为 ecmascript 执行JS代码是从 ...
- JQuery 在$(window).load() 事件中 不运行 $(window).resize()
本文转载至: http://stackoverflow.com/questions/2597152/jquery-window-resize-doesnt-work-on-load 原文标题 :J ...
- res_d_l =[{'contents':d.contents,'href':d.attrs['href']} for d in rd] 泛型
from selenium import webdriverfrom selenium.webdriver.chrome.options import Options# from selenium.w ...
- HTML --- <a href=”#”>与 <a href=”javascript:void(0)” 的区别
<a href=”#”>中的“#”其实是锚点的意思,默认为#top,所以当页面比较长的时候,使用这种方式会让页面刷新到页首(页面的最上部) javascript:void(0)其实是一个死 ...
- window.history.back()的改进方法window.history.go()
今天在做项目时,測试人员提出了一条bug,起初没当回事,在改动过程中才意识到其重要性,故记录下来. 依照需求,系统应该实现例如以下的功能:有三个关联的页面a.aspx(简称a),b.aspx(简称b) ...
- window.load 和$(document).ready() 、window.load和body onload区别
1.执行时间 window.onload必须等到页面内包括图片的所有元素加载完毕后才能执行. $(document).ready()是DOM结构绘制完毕后就执行,不必等到加载完毕.2.编写个数不同 w ...
- 调试location指令时,直接让location输出文本
有时候我们调试location指令时希望location指令能够直接输出文本,这样能够方便我们进行调试.这时我们可以使用echo模块实现,但是大多数情况我们没有安装这个模块,那么我们还可以使用另一个方 ...
随机推荐
- Apache 虚拟目录和默认首页的设置
Apache虚拟目录和默认首页的设置,用apache服务器的朋友必须要懂的. 虚拟目录 1.找到"conf/httpd.conf" 文件 2.在节点:<IfModule al ...
- 多线程-Fork/Join
Fork/Join Java7提供了Fork/Join来支持将一个任务拆分成多个“小任务”并行计算,再把多个“小任务”的结果合并成总的计算结果. 类图 Java7提供了ForkJoinPool来支持将 ...
- Myeclipse中误报错误解决办法
下午写jsp页面的时候,用了一个js文件,拖到MyEclipse下了报错,开始还以为是js文件问题,折腾了半天,后来才知道原来是Myeclipse误报错误.真坑爹啊呀~~ 解决方法: 点击你需要忽略错 ...
- matplotlib之设置极坐标起点的位置
#!/usr/bin/env python3 #-*- coding:utf-8 -*- ############################ #File Name: polar.py #Auth ...
- uGUI Anchor
Anchor定位:inspector面板的Rect Transform组件中PosX左边的方框图标就是设置锚点的,做界面自适应时可定位控件在视图中的位置,与NGUI类似.Anchor+Canvas的C ...
- 迅搜sdk试用
1. sdk支持PHP 2. 针对mysql的某个库的某个表??进行索引,简单的说就是一个project,需要对应一个配置文件: 3. 分索引服务与搜索服务两个,另带中文分词功能:索引数据会有演示,但 ...
- 【shell】tar命令详解
tar [-cxtzjvfpPN] 文件与目录 ....参数:-c :建立一个压缩文件的参数指令(create 的意思):-x :解开一个压缩文件的参数指令!-t :查看 tarfile 里面的文件! ...
- VMWare虚拟机 网络连接模式
这个是rocks 群里面我的一个朋友分享的,我觉很好而且描述的很清楚,这是一个做事的态度问题. 1 VMWare虚拟机bridged.host-only和NAT网络模式的区别和用法 VMWare提 ...
- 打开.py文件的方法
用IDLE打开这个文件,然后按F5,系统就自动开始运行这个python程序,然后当前运行目录就跳转到这个目录了
- PAT003 List Leaves
题目: Given a tree, you are supposed to list all the leaves in the order of top down, and left to righ ...