<script language="javascript">
otherwin=window.open("","","")
otherwin.document.write("这是弹出页面!")
oowin=otherwin.window.open("","","")
oowin.document.write("这是弹出窗口的弹出窗口!")
</script>
otherwin=window.open("","","")
otherwin.document.write("这是弹出页面!")
oowin=otherwin.window.open("","","")
oowin.document.write("这是弹出窗口的弹出窗口!")
</script>
otherwindow.document.open(...); // 1c
otherwindow.document.write(...); // 2c
并不能保证2c会在1c动作完成后才执行,如果1c打开窗口的动作还没有完成,这时候执行2c是不会成功的。
这是在处理分帧和多框架(FRAME)的时候经常忽视的问题。
所以2c所需要做的事情最好是在otherwindow中document最後调用(至少应该等待所操作的组件加载完毕以后进行操作,即使同一页面也该注意这个保证执行流程顺序的问题)。