1.刷新本页面
在body里写一个A链接. 然后在javascript中使用click()调用.
注意:在头部加上:<base target="_self" />,如果有使用WdatePicker日期控件,
请加到日期控件的JS后面.
引用
第一步:
加上 <base target="_self" />
<script language="javascript" type="text/javascript" src="../My97DatePicker/WdatePicker.js"></script>
(有日期控件一定加在日期控件后面,不然IE6会报错)
<base target="_self" />
引用
第二步:
写一个链接.
<a id="newPage" href="本页面的链接.jsp" style="display: none;"> </a>
引用
第三步:
在JS处调用这个,至于需要在哪个地方调用自己放.
newPage.click();
2. ShowModalDialog的高度(IE8版本)
根据IE8浏览器,设置好页面的高度,但是在IE6中,弹出的模式窗口高度被缩小了.
自己总结一个方法:
在JS中写入:
引用
function setHight(height){
var ua = navigator.userAgent.toLowerCase();//客户端浏览器信息
var size="";
if (window.ActiveXObject){//判断IE浏览器
size=ua.match(/msie ([\d.]+)/)[1];//得出IE的版本大小
}
if(size=="6.0"){
height = Number(height) + 60; //在IE8中的高度加60就是IE6下的高度了.
}
return height;
}
在给模式窗口设置高度时可以使用这个方法:
var height = setHight(610); //这个610是IE8中模式窗口的高度.
分享到:
相关推荐
网上找了好几个小时没有找到解决办法。最终还是自己解决了。...这样做就是用超链接把返回url转递到用showModalDialog打开的新窗口中,当showModalDialog返回时指到转来的url,最终不刷新父窗口。......
window.showModalDialog以及window.open用法简介
showModalDialog刷新窗口的例子
关于struts2里用javascript刷新window.showModalDialog的父页面
ShowModalDialog函数的功能: 使用方法: 参数说明:
主页面用window.showModalDialog的时候,如果直接打开其它系统的页面,这时候别人的页面在window.returnValue=1;这样返回值的时候,主页面是取不到返回值的,原因就是因为跨域了.
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 ...
NULL 博文链接:https://shawnfree.iteye.com/blog/598885
window.showModalDialog以及window.open用法简介
针对window.showmodaldialog弹出窗体无刷新的详细使用
showModalDialog和window.open
showModalDialog和showModelessDialog使用心得
使用window.showModalDialog的程序员都知道,该方法可返回值。但是如果遇到跨域时,就返回为underfine。本文档通过iframe镶嵌页面解决该问题。
window.showModalDialog&&open.docx
JS中showModalDialog 详细使用 基本介绍: showModalDialog() (IE 4+ 支持) showModelessDialog() (IE 5+ 支持) window.showModalDialog() 方法用来创建一个显示HTML内容的模态对话框。 window....
javascript中showModalDialog子页面值赋给父页面 并解析json格式的值
window.showModalDialog的基本用法
Selenium目前没有提供对IE模态对话框(即通过showModalDialog方法打开的弹出对话框)的处理。原因在于,模态对话框会将父页面的 JS挂起,直至对话框处理完毕才会继续执行父页面JS。因为Selenium的底层实现是基于JS的,...
它在最新的 Google Chrome 和最新的 Mozilla Firefox 中进行了测试,在about:config中将dom.dialog_element.enabled首选项设置为true 。 在使用showModalDialog函数之前,只需包含以下 HTML 代码: [removed]...