Possible Duplicate:
Javascript or JQuery get html content from external site
I want JavaScript to get a web page, say the Google homepage, and retrieve its (obviously) HTML code. I have no idea of how to do it, mainly because I’m not really into JavaScript-ing. If possible, I’d use solutions which don’t require libraries (eg jQuery) or light ones, due to speed issues.
As Mitch correctly said, it is not possible for JavaScript to download HTML from an arbitrary web site.
I am not sure what your requirements are, but here are some ideas that can handle less general cases: