I have a form which has many elements (e.g. textarea, input, select), after users have entered some data the states of these elements should change.
For example, an input[type="radio"]
element will have the attribute checked="checked"
if a user has checked it. The value
attribute of an input[type="text"]
element will contain the text entered by user.
The problem is that the html string returned by $('#form1').html()
does not contain these data.
Feel free to take a look at this example:
You can see that no matter what your inputs are, the html returned is still the same (having no attribute data).
Is there any easy way to collect the html including their states?
Thanks in advance.