即时通讯工作与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