【发布时间】:2023-03-05 23:44:01
【问题描述】:
我正在尝试使用 Jquery .load() 方法从外部网站提取一些信息,但这似乎不起作用,有什么想法吗?我在 Firefox 和 chrome 上都进行了测试。
<!DOCTYPE html>
<html>
<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js">
</script>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div1").load("http://www.weather.com/weather/5-day/CEXX0001 #wx-forecast-container");
});
});
</script>
</head>
<body>
<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>
<button>Get External Content</button>
</body>
</html>
【问题讨论】:
标签: javascript jquery html