我需要加载一个响应网站到一个 div 在我的 HTML 页面没有使用 iframe
元素。
我已经尝试了 这个链接; 它适用于单个页面 URL,我在脚本中提到过这一点。
$('#mydiv').load('http://localhost/qa/ask#external-div', function(response, status, xhr) {
if (status == "error") {
var msg = "Sorry but there was an error: ";
alert(msg + xhr.status + " " + xhr.statusText);
}
});