There is no responseHTML attribute belong responseText and responseXML in XMLHttpRequest, but this is not a problem. If we want to get data from another HTML page and insert it into the displayed page, this can be achieved easily.
- A variable or a div tag to store the other web page.
- In the second case, the content is not be displayed, as we make use of the display attribute of CSS with the none value.
- Once the other page assigned to the variable or inserted into the tag , its content is accessible with DOM's methods.
- Actually, only the content of the body tag is taken from the page, as html and head tags do not have to appear inside the body of the page.