开发者

How to find the HTML code of a incomplete page using FF addon?

开发者 https://www.devze.com 2023-03-08 19:58 出处:网络
Well, document.body.innerHTML works only when the page has <body>...</body> tag in the page. But if the page loading is interrupted due to 开发者_如何学编程any reason, the page will have &

Well, document.body.innerHTML works only when the page has <body>...</body> tag in the page. But if the page loading is interrupted due to 开发者_如何学编程any reason, the page will have <body> tag but no </body> tag. So, document.body.innerHTML will not work. How to get the HTML code of the page??


Each document has a root element, even if there is no body. So document.documentElement.innerHTML should always work.

0

精彩评论

暂无评论...
验证码 换一张
取 消