即時通訊工作與jquery加載功能,需要填寫div的內容從頁面到另一頁。jquery加載函數不工作在鉻在Firefox中工作?
first.html
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
<script>
$('#getselect').find('option:selected').text();
</script>
</head>
<body>
<div id="getdiv">Not loaded yet.</div>
</body>
</html>
second.html
<!DOCTYPE html>
<html>
<head>
<script src="http://code.jquery.com/jquery-1.9.1.js"></script>
</head>
<body>
<b>Footer navigation:</b>
<div id="getit"></div>
<div id="getitselected"></div>
<script>
$("#getit").load("first.html #getdiv");
</script>
</body>
</html>
該腳本能正常工作在Firefox,但在CHROM不工作。請幫幫我。
不工作意味着 – PSR 2013-05-14 09:23:23
刪除first.html中的所有html,head,body標籤。 – 2013-05-14 09:23:41
你是否假設第一個文件中的jQuery代碼將在第二個文件中設置選擇? – adeneo 2013-05-14 09:26:05