2014-02-24 84 views
0

我使用​​函數從另一頁面加載內容。我的頁面是http://example.org/mypage.html和包含此jQuery的:從元素中獲取內容(URL)並將其放入jQuery代碼中

$(".content").load("http://example.org/12333.html .data"); 

如何我可以從另一個頁面獲得此URL http://example.org/12333.html動態:http://example.org/static.html我的jQuery代碼?

我static.html樣子:

<div class="link"> 
    <a href="http://example.org/12333.html">Link</a> 
</div> 
+0

我想你可以在'static.html鏈接'上運行'.load'並''用'href'找到第一個'a' – tymeJV

回答

0

您可以使用這個號碼, 「目標」 的另一頁。

$("#b").load("article.html #target"); 
相關問題