Hi,
I would want to dynamically get the DOM structure (HTML source) of a web page. I want to do some manipulations with it later. Is this possible in javascript at all?
Thanks.
Hi,
I would want to dynamically get the DOM structure (HTML source) of a web page. I want to do some manipulations with it later. Is this possible in javascript at all?
Thanks.
This is possible - it's what javascript is for! Use the document object. i.e.
document.documentElement.innerHTML
Yes, it is. It is a core part of browser's Javascript, DOM manipulation of your web page.
Your best (and safest) bet is to either fetch the other web page server side and include it in the HTML of your page as a hidden element.