JS使用showModalDialog展示窗口时,会出现页面缓存,无法刷新的现象。
解决的关键是模式窗口请求的URL参数是否变化。以下JS解决此问题
function openModalDialog(src, width, height, showScroll){
var timestamp = Date.parse(new Date());
var times = timestamp;
if(src.indexOf("?") > 0){
src=src+"&myTimes="+times;
} else {
src=src+"?myTimes="+times;
}
return window.showModalDialog(src,"","location:No;status:No;help:No;dialogWidth:"+width+";dialogHeight:"+height+";scroll:"+showScroll+";");
}
分享到:
相关推荐
这涉及到ShowModalDialog缓存机制的问题,需要我们手动添加一些代码来清除缓存。 操作方式如下: 首先在前台界面(即aspx的界面)代码中,添加:<meta http-equiv=”expires” content=”0″ /><%–...
在使用showModalDialog弹出窗口时,显示的数据是上次修改前的数据,这是因为默认情况下页面保存了缓存,所以显示的数据并不是修改后的情况
div层实现showModalDialog
This is a `window.showModalDialog()` shim using a modal HTML5 `<dialog>` element and ECMAScript 6 Generators. It was tested in the latest Google Chrome with the *Enable Experimental JavaScript* flag ...
showModalDialog参数传递和获
showModalDialog和showModelessDialog使用心得
Selenium目前没有提供对IE模态对话框(即通过showModalDialog方法打开的弹出对话框)的处理。原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,...
showModalDialog参数详解 基本介绍: showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDialog()方法用来创建一个显示HTML内容的模态对话框。 window.showModelessDialog()...
showModalDialog刷新窗口的例子
解决三层或心上showModalDialog的问题_2
网上找了好几个小时没有找到解决办法。最终还是自己解决了。...这样做就是用超链接把返回url转递到用showModalDialog打开的新窗口中,当showModalDialog返回时指到转来的url,最终不刷新父窗口。......
DIV 实现showModalDialog效果,内加树形效果
window.showModalDialog的基本用法
主要介绍showModalDialog的用法和参数的传递
javascript代码模块之\Window.ShowModalDialog使用手册
ShowModalDialog函数的功能: 使用方法: 参数说明:
使用window.showModalDialog的程序员都知道,该方法可返回值。但是如果遇到跨域时,就返回为underfine。本文档通过iframe镶嵌页面解决该问题。
解决三层或心上showModalDialog的问题_js
解决谷歌浏览器37+版本window.showModalDialog方法失效问题,最终版本。 10分你值得拥有