打开者页面:(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();" >
本文介绍了一种通过JavaScript实现页面间的跳转并传递数据的方法,包括使用`showModalDialog`函数创建模态对话框以及如何在不同页面之间交换数据,涉及到页面布局与交互设计。
111

被折叠的 条评论
为什么被折叠?



