简体   繁体   中英

How can I copy dynamically generated source HTML from the web?

For design purposes, I want to copy the exact HTML that is created by some JavaScript after the page loads. Firebug shows me what's going on, of course, but I really just want some static text that I can copy and paste at will.

Web Developer Firefox Add-on的“View Source”菜单提供了“View Generated Source”工具。

That can be done with the innerHTML or outerHTML properties. Or just in Firefox, select the part you want the source code from and select View Selection Source from the context menu.

您可以将firebug(或IE8开发人员工具集)中的HTML复制到您喜欢的文本编辑器中。

在Google Chrome中,选择Inspect Element,然后您可以右键单击并“复制为HTML”

For IE/firefox, following bookmarklet works: https://www.squarefree.com/bookmarklets/webdevel.html#generated_source

For google chrome, right click on any element and choose 'Inspect Element' option. It will show the position of element in DOM. Now right click on '

For opera, right click on any element and choose 'Inspect element'. This will start opera dragonfly. In dragonfly window, Click on 'Expand the DOM tree' button (first button with a dot and two arrows) and then 'export the current DOM panel' button (second button)

In IE, open the webpage and press F12 to open developer tools. Click View->Source->DOM(page) or shortcut Ctrl+Shift+G in developer tools window. This will show the complete currently visible DOM.

For firefox, alternative is Web developer toolbar extension and choose View Source->View Generated source in it.

你也可以用Library mechanize编写一个perl脚本。

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM