简体   繁体   English

如何在新标签页或窗口中打开 iframe 链接

[英]How to open iframe link in new tab or window

I am using some iframe tags in my html page as shown below:我在我的 html 页面中使用了一些 iframe 标签,如下所示:

   <TABLE border="0" width="900">
    <tr valign="top">
    <td width="300" ALIGN=center>
                  <iframe src='http://www.apple.com/in/'  frameborder = 0, height=250, width = 300  > </iframe><br>

    </div>
       </td>

    <td width="300" ALIGN=center>
            <div class="item_list">
            <iframe src = 'http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-137232779171598318'  frameborder = 0, height=250, width = 300 base target="_blank"  > </iframe></a><br>
            </div>
      </td>
      <td width="300" ALIGN=center>
            <div class="item_list">
            <iframe src = 'http://www.flipkart.com/affiliate/displayWidget?affrid=WRID-  137232785207215857' frameborder = 0, height=250, width = 300 > </iframe>
      <br></div>
    </td>
    </tr>
     </TABLE>

Now what i need , is to open the link which is inside in iframe to new tab or window.现在我需要的是打开 iframe 中的链接到新选项卡或窗口。 I have used below script regarding this, but no luck.我已经使用了下面的脚本,但没有运气。

   <SCRIPT LANGUAGE="JavaScript">

   function goNewWin() {

    //***Get what is below onto one line***

    window.open("backbuttonnewpage.html",'TheNewpop','toolbar=1,
   location=1,directories=1,status=1,menubar=1,
    scrollbars=1,resizable=1'); 

   //***Get what is above onto one line*** 

   self.close()

      }

   </SCRIPT>   

can anyone suggest me any solution for this?任何人都可以建议我对此有任何解决方案吗?

I think you're trying to just open a new page in a new tab.我认为您正在尝试在新选项卡中打开一个新页面。 If so, here is the code you need:如果是这样,这里是您需要的代码:

<a href="WebAdress.netdom" target="_blank"><button>Open New Tab</button></a>

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM