在iframe中打开.window [英] Open.window in iframe
问题描述
我正在制作一个简单的网页以获得乐趣,并且我是JavaScript的noob,我希望在单击时打开
窗口,并且想要在iframe中打开它们,并且我想将它全部正常window.open的功能,我也希望它最大化窗口,但内部的iframe,而不是外部。我知道关于window.open并开始工作我只是想让窗户在iframe中工作,而不是在室外工作。我使用记事本作为我的编辑器。这是我的第一个问题,所以请原谅我,如果我犯了任何错误,谢谢。
解决方案
在$ iframe :
- 中的$ c> window
用名称创建
iframe
。< iframe NAME = theFrame >< / iframe中>
-
现在使用
脚本
way:
window.open(url,theFrame);
I am making a simple webpage for fun and I am a noob at JavaScript and I want to make windows open up when clicked and I want to open them up inside an iframe and I want to give it all the functionality of a normal window.open and I also want it to maximize the windows but inside the iframe and not outside. I know About the window.open and go it to work I just want to make the windows work inside an iframe and not outside. I am using Notepad for as my editor. This is my first question so please forgive me if I made any mistakes thanks.
If you want to open a window
within an iframe
:
Create the
iframe
with a name.<iframe name="theFrame"></iframe>
Now use the
script
this way:window.open(url, "theFrame");
这篇关于在iframe中打开.window的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!