Skip to content Skip to sidebar Skip to footer

Use Javascript To Fetch Content From External Site

Say I there's mypage.html and otherpage.html otherpage.html has some content

content is content

I want a javascript that can fetch the content from otherpage.htm

Solution 1:

From the title, it appears that otherpage.html is in a different domain. This being the case this is not possible in the browser (there's a few exceptions with flash/java/silverlight). If the page is in the same domain, it's easy. Take a look at jQuery.get.

Post a Comment for "Use Javascript To Fetch Content From External Site"