I am trying to capture the modified HTML of a form to save it for later use. I ideally would like a string that have "checked" and "selected" attributes on radio button/ dropdowns that the user has selected. I am using jQuery and I thought I could do a simple $('form').html() on the form and it would return me the form HTML with the new user input开发者_Go百科ed values, but it returns me the original HTML with no user input.
How can I create a string of HTML from the filled out form that reflects the user's changes?
I thought I'd take a wack at this just for educational purposes... You could bind all appropriate events to actually edit the DOM:
http://jsfiddle.net/jkj4h/
精彩评论