2017-03-07 95 views
0
同一頁

我已經創建的HTML頁面如下:打開鏈接一個div裏面

<!DOCTYPE html> 
 
<html> 
 

 
<body bgcolor="#EBF5FB"> 
 
    <h1 align="center">SLA Monitor Reports </h1> 
 
    <div id="link" align="center"> 
 

 
    <table cellpadding="25px" border=1> 
 
     <tr> 
 

 
     <td> 
 
      <a href="https://serv.sxp.nova.corp/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.nova.pct!2fplatform_add_ons!2fcom.nova.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?BOOKMARK=CU4A95OJ17A355B2112ML30G6" target="_blank"><img src="\\server\server$\23185\Downloads\1Google.png" alt="Ticket Aging" style="width:200px"></a> 
 
     </td> 
 
     <td> 
 
      <a href="https://serv.sxp.nova.corp/irj/servlet/prt/portal/prtroot/pcd!3aportal_content!2fcom.nova.pct!2fplatform_add_ons!2fcom.nova.ip.bi!2fiViews!2fcom.sap.ip.bi.bex?BOOKMARK=CU4A95OJ17A355B2112ML30G6" target="_blank"><img src="\\server\server$\23185\Downloads\1Google.png" alt="Ticket Aging" style="width:200px"></a> 
 
     </td> 
 
     </tr> 
 
    </table> 
 
    </div> 
 
    <div> 
 

 
    </div> 
 

 
</body> 
 

 
</html>

我想要顯示的https://開頭..... 。鏈接的內容使用<div>在同一頁的表格下。

IFrames沒有幫助,因爲它是一個安全的鏈接。

任何人都可以請幫忙。

+0

你的問題不清楚! –

+0

你可以試試這個$(yourDiv).load(「yourLink」); – cbalakus

回答

0
$("#link table td a").click(function(e){ 
    $("#link").next().load($(this).attr("href")); 
    e.preventDefault() 
}); 

https://jsfiddle.net/7uj8tk2y/

+0

嗨...上面的代碼看起來不錯,但我如何顯示它在同一頁使用div標記 – Smith

+0

它應該在同一頁面中工作。它不能在小提琴上工作,你有沒有訪問這些鏈接? – cbalakus

+0

感謝您的回覆,要求是鏈接內容(例如https://www.google.co.in)應顯示在表格下方。我在表格下方使用了div標籤,但不知道如何重定向目標鏈接到這個div – Smith