在iframe中打开.window [英] Open.window in iframe

查看:880
本文介绍了在iframe中打开.window的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在制作一个简单的网页以获得乐趣,并且我是JavaScript的noob,我希望在单击时打开
窗口,并且想要在iframe中打开它们,并且我想将它全部正常window.open的功能,我也希望它最大化窗口,但内部的iframe,而不是外部。我知道关于window.open并开始工作我只是想让窗户在iframe中工作,而不是在室外工作。我使用记事本作为我的编辑器。这是我的第一个问题,所以请原谅我,如果我犯了任何错误,谢谢。

解决方案

在$ iframe :




  1. 中的$ c> window

    用名称创建 iframe

     < iframe NAME = theFrame >< / iframe中> 


  2. 现在使用脚本 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:

  1. Create the iframe with a name.

    <iframe name="theFrame"></iframe>
    

  2. Now use the script this way:

    window.open(url, "theFrame");
    

这篇关于在iframe中打开.window的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆