日期:2014-05-16  浏览次数:20272 次

在ModalDialog中刷新父页面的问题
在父页面中showModalDialog弹出子页面
在子页面不关闭的前提下,通过window.dialogArguments.xxxx();调用父页面的方法刷新父页面
firefox下没有问题;ie各版本都不能立即刷新,只有关闭子页面,父页面才会刷
有什么办法能让父页面立即刷新?
谢谢!

------解决方案--------------------
IE是可以的啊

a.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>TEST</title>
<script type="text/javascript">
function xxxx() {
alert("测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试测试");
}
</script>
</head>
<body>
<input type="button" onclick="showModalDialog('b.htm',window)" value=" test "/>
</body>
</html>

b.htm
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
</head>
<body>
<input type="button" onclick="window.dialogArguments.xxxx();" value=" test " />
</body>
</html>