How to get HTML from external contents with Jquery?
Posted
by
André
on Stack Overflow
See other posts from Stack Overflow
or by André
Published on 2010-12-28T13:52:12Z
Indexed on
2010/12/28
13:53 UTC
Read the original article
Hit count: 245
Hi,
I have successfully achieved the task of getting an internal webpage to show on my HTML, like I show bellow.
click here to see teste1.html $('#target').click(function() { $.get('teste1.html', function(data) { $('#result').html(data); alert('Load was performed.'); }); });
The main goal is to get an external webpage, but this is not working:
$.get('http://www.google.com/index.html', function(data) { $('#result').html(data); alert('Load was performed.'); });
I need to get the HTML from an external webpage to read the tags and then output to Json.
Some clues on how to achieve this(load external webpages with Jquery, or should I do it with PHP)?
Best Regards.
© Stack Overflow or respective owner