【问题标题】:How to open iframe link in new tab or window如何在新标签页或窗口中打开 iframe 链接
【发布时间】:2013-09-30 12:01:38
【问题描述】:

我在我的 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>

现在我需要的是打开 iframe 中的链接到新选项卡或窗口。我已经为此使用了以下脚本,但没有运气。

   <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>   

谁能建议我解决这个问题?

【问题讨论】:

  • 尝试 parent.window.open("backbuttonnewpage.html",'TheNewpop','toolbar=1, location=1,directories=1,status=1,menubar=1, scrollbars=1,可调整大小=1');
  • @Iv0gun9 它没有任何其他选择
  • 查看 [this][1] 解决方案,希望对您有所帮助 [1]:stackoverflow.com/questions/4583792/…

标签: javascript html iframe tabs hyperlink


【解决方案1】:

我认为您只是想在新标签页中打开一个新页面。如果是这样,这是您需要的代码:

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

【讨论】:

    猜你喜欢
    • 2014-12-12
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2018-11-04
    相关资源
    最近更新 更多