开发者

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

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜