views:

403

answers:

5

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.

+3  A: 

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.

Gumbo
+3  A: 

You can copy the HTML out of firebug (or the IE8 developer toolset) into your favourite text editor.

DDaviesBrackett
+6  A: 

The "View Source" menu of the Web Developer Firefox Add-on offers the "View Generated Source" tool.

lance
"View Generated Source" is exactly what I was looking for! Thanks lance!
baxter
If Web Developer could wear a cape, I'm convinced it would rescue people from falling buildings.
lance
A: 

you could also write a perl script with the Library mechanize.

fenec
+1  A: 

In Google Chrome, choose Inspect Element, then you can right click and "Copy as HTML"

plutext