I have inputs created dynamically by jQuery, I set init value to it, and I want it keeps that value as default value (will show again after resetting form). I searched around, but cannot find the solution.
To make it clear, after someone rate down my question, the default value here is not the value stored in placeholder (will disappear when the input get focused), it's the true, editable text!
I found solution! when resetting form, web browser will take the text in "value" attribute of inputs and display it again as default text. So, if we create a new input element, we must give it "value" attribute. In jQuery, instead of using method val() which only temporary changes the viewable value of element but not overwrite value attribute of input, we should use method attr('value', newValue)