One option is the XMLHttpRequest, however, it is restricted to the same domain of your website due to the Same Origin Policy.
If you are looking for ways to bypass the Same Origin Policy, you can read this Stack Overflow post:
- Different methods to work around the same-origin policy
UPDATE:
Below is a simple (not cross-browser) example:
var xhr = new XMLHttpRequest();
xhr.open('GET', '/questions/3315235', true);
xhr.onreadystatechange = function() {
if (xhr.readyState === 4) {
console.log(xhr.responseText);
}
};
xhr.send(null);
If you execute the above code in Firebug, while having Stack Overflow open, you will see the HTML of this question displayed in your JavaScript console:
Using JavaScript to access another webpage: http://img217.imageshack.us/img217/5545/fbugxml.png