Q:

Saving the DOM as HTML after modification

In an Rails app I want to modify the DOM of a web page using javascript
Can I save the resulting HTML (of the whole page) after each modification to a database?
Thanks.

A:

With jQuery you could use var html = $(document).html();
Then post the html with $.ajax() to the controller where you choose to save it.

