`
zhangziyueup
  • 浏览: 1171316 次
文章分类
社区版块
存档分类
最新评论

ie8下showmodaldialog页面回传会打开新页面的问题

 
阅读更多
转自:http://www.cnblogs.com/binaryworms/archive/2010/04/07/1706481.html

打开者页面:(index.html)

<script type="text/javascript" >
function OpenDialog()
{
showModalDialog("dialog.html",window,"dialogWidth=700px;dialogHeight=400px;");
}
function Changing()
{
document.getElementById("god").value="能打开?";
}
</script>

<input type="button" id="god" value="打开" onclick="OpenDialog();" >

dialog.html 页面:

<iframe name="god" src="oprater.html" frameborder="0" height="400px" width="600px"></iframe>

oprater.html框架内的页面:

<script type="text/javascript" >
function grandParent()
{
parent.window.dialogArguments.Changing();
}
</script>

<input type="button" value="换原来的值" onclick="grandParent();" >

分享到:
评论

相关推荐

Global site tag (gtag.js) - Google Analytics