当前位置: 代码迷 >> JavaScript >> window.dialogArguments.location.reload(),IE7下无效解决思路
  详细解决方案

window.dialogArguments.location.reload(),IE7下无效解决思路

热度:730   发布时间:2012-02-15 12:09:44.0
window.dialogArguments.location.reload(),IE7下无效
window.dialogArguments.location.reload()

为什么啊,IE6下没问题

window.showModalDialog(url,window, "dialogHeight....
这样打开的

------解决方案--------------------
采用这个方法

例子
1.htm
===========
<title> 1 </title>
<input type=button value= "open 2 " onclick= "window.showModalDialog( '2.htm ',window); ">
<script>
alert( "1 ")
</script>


2.htm
===========
<title> 2 </title>
<frameset cols= "0,* ">
<frame src= " ">
<frame src= "b.htm ">
</frameset>

b.htm
==========
<input type=button value= "open 3 " onclick= "window.showModalDialog( '3.htm ',window); ">
<script>
alert( "我是2 ")
</script>


3.htm
=========
<title> 3 </title>
<frameset cols= "0,* ">
<frame src= " ">
<frame src= "c.htm " name= "x ">
</frameset>


c.htm
=====
<input type= "button " value= "refresh 2 and close me " onclick= "window.dialogArguments.location= '2.htm ';window.parent.close() ">


注意:showModalDialog缓存的厉害,请清空缓存每次测试
  相关解决方案