What I want to be able to do is alter the "value=" of an input text box using jQuery. The ultimate goal is to grab a form using .html() so I have all of the code, along with the values typed into the input boxes.
As an example I have this:
<span id="example">
<input type="text" value="" id="rate" />
</span>
If a user types into the input box I can save the data using .val, but what I want to do is grab the HTML so I can re-display the input box with the value.
If an user types "bob" into the input. Then I use:
var test = $('#example').html();
The variable 'test' holds the following:
<input type="text" value="" id="rate" />
What I want is:
<input type="text" value="bob" id="rate" />
How do I achieve this?