开发者

is there a tool to capture all DOM webpage elements generated by browser-side javascript as html, for a full page html archive?

if a whole bunch of elements gets generated in my browser by javascript (using JSON data or just out of thin air) I am not able to fully archive such a page by saving its source. I already tried saving it as .mht file in IE, but that does not work - IE does not save the dynamically generated elements either.

An example of such a page is here http://www.amazon.com/gp/bestsellers/wireless/ref=zg_bs_nav - notice that "price" and "X new" elements do not exist in the source html but rather are dynamically generated.

If I wanted to parse this, I could work directly with the DOM by various means, yadda-yadda. But if I want to automagically save the page as html document such tha开发者_高级运维t it could be rendered with all the dynamically generated elements nicely rendered even while javascript is turned off, so far I am SOL.

Any suggestions?


In Firefox there's the Web Developer extension: https://addons.mozilla.org/en-US/firefox/addon/web-developer/

Once installed you can use View Source -> View Generated Source to access the JavaScript-modified HTML.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜