0
 var xmlhttp = null; if (window.XMLHttpRequest) { xmlhttp = new XMLHttpRequest(); } else { xmlhttp = new ActiveXObject("Microsoft.XMLHTTP"); } xmlhttp.onreadystatechange = function() { if (xmlhttp.readyState == 4 && xmlhttp.status == 200) { return xmlhttp.responceText; } } this.model.result = xmlhttp.onreadystatechange; xmlhttp.open("GET", this.model.konfig, false); xmlhttp.send(); } 
3
  • If you wish to load external page via link and read it as string, refer stackoverflow.com/questions/14779467/… Commented Jun 22, 2016 at 10:22
  • @Rajesh, not even remotely close. Commented Jun 22, 2016 at 10:23
  • And if you just wish to open some page in some div of your page, you can look into iFrames. Commented Jun 22, 2016 at 10:24

1 Answer 1

0

You can obtain the HTML content of any node with innerHTML. Example (for body node):

document.getElementsByTagName('body')[0].innerHTML 
Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.