When working with HTML Forms, it can in some situations improve the usability of the site, if the content of elements can change and reflect the options, that the visitor made in the previous fields.
The most common form element are input, checkbox, radio buttons, textarea and dropdown boxes and I will try to cover them all, even though the code might be the same or very much alike.
Input boxes
Fetching content is done with:
// fetching the value
$("#inputbox").val();
Try it:
Setting new content is done with:
// setting a new value
$("#inputbox").val("We have now changed the text");