使用jQuery将外部URL加载到div中 [英] Load a external URL into a div using jQuery
本文介绍了使用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.
这篇关于使用jQuery将外部URL加载到div中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文