Tongates(文文) :请问如何实现模式窗口阿?谢谢
解决方案 »
- jquery如何选中textarea中的文字
- 一道很简单的框架问题
- js 乱码问题
- 【高难度】如何获得父框架的JS变量值
- 求助,急,在线等!!!
- 初学者提问!怎样才可以确实页面中两个提交按钮用户按了那个啊?
- 请教:如何使窗口没有最大化、最小化和关闭按钮?(在县等待)
- 怎么用正则表达式判断一个字符串只含有x和o,长度为5
- 怎么方便的实现这种效果:当鼠标移到<td>单元格中时,单元格中的超连接文本变色,同时单元格背景色也发生变化?就象www.rongshu.com上面
- 【toggle】绑定事件与显示隐藏
- 怎么用javascript保存当前网页为html文件
- var obj=new ActiveXObject("XXXXXX")当中能填哪些??有没有列表?关于XML的又有哪些?
function doModal(url){
win=window.showModalDialog(url,0,"dialogWidth:500px;dialogHeight:500px;status:no;help:no;");
document.location.reload();
}showModalDialog()将中断主窗口的运行直到自己被关闭。
所以document.location.reload();在showModalDialog关闭后才执行方法2
在父窗口
function doModal(url){
win=window.showModalDialog(url,0,"dialogWidth:500
px;dialogHeight:500px;status:no;help:no;");
if (win=="t")
{
document.location.reload(ture);
}
}
在模式窗口
window.onunload()
{
window.returnValue=="T";
}方法3
用window.opener.location.reload()就可以了。
use window.open to open the window
and <body onbeforeunload="opener.location.reload()"><INPUT type=button value="刷新" onclick="opener.location.reload()">
<a href="javascript:opener.location.reload();">刷新父窗口</a>
<a href="javascript:parent.location.refesh();">刷新父窗口</a>自动关闭窗口的办法:<script language=javascript>
alert("你的操作已成功");
window.opener=null;
window.close();
</script><script>
alert("您的操作已成功");
window.close();
</script><script language=javascript>
alert("你的操作已成功");
window.close;
</script>