主页 文章 常见问题解答 外部参照 游戏 软件 即时 论坛 关于 FOLDOC公司 副本请求 反馈 网站地图
爱尔兰共和国。组织
#

Q398我如何通过单击窗口中的按钮,打开一个新窗口,在新窗口中设置框架集,并向框架写入文本,所有这些都来自同一个脚本?

你在这里:irt.org网站|常见问题解答|JavaScript脚本|窗口|问题398[以前的 下一个]

尝试以下操作:

<script language=“JavaScript”><--函数createWindow(){mywindow=window.open('about:blank','mywindowname','width=300,height=300');setTimeout('createFrameset()',10);}函数createFrameset(){var输出='<frameset rows=“50%,*”>'+'<frame src=“about:blank”>'+'<frame src=“about:blank”>'+“<\/框架集>”;mywindow.document.write(输出);setTimeout('createFrames()',10);}函数createFrames(){创建框架1();创建帧2();}函数createFrame1(){mywindow.frames[0].document.write(“你好”);}函数createFrame2(){mywindow.frames[1].docent.write('<h1>World</h1>');}//--></脚本><表格><input type=“button”onClick=“createWindow()”value=“创建弹出框集”></form>

关于的反馈“Q398我如何通过单击窗口中的按钮,打开一个新窗口,在新窗口中设置框架集,并向框架写入文本,所有这些都来自同一个脚本?”

©2018 马丁·韦伯