使用jQuery将外部URL加载到div中
问题描述:
我想将整个网站加载到div中。当我使用
I want to load a whole site into a div. When I use
$(document).ready(function(){
$('#result').load('http://www.yahoo.com');
});
它无效。
答
使用javascript进行跨域调用。您可以使用iframe加载。
查看此链接,了解可能的解决方案。
It will be a cross domain call to do using javascript. You can use iframe to load. Check this link for possible solutions.