我正在使用 jquery 加载函数,该函数需要将 div 的内容从页面填充到另一个页面。
第一个.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>
第二个.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 中无法运行。请帮我。