Saturday, 24 August 2013

set the default value of an input text with java script

set the default value of an input text with java script

my requirement is to save the entire "html" inside a div, but when i load
an "html" with text fields to a div and then editing the value of the text
box, the newly set value doesn't reflect in the core "html". I tried to
inspect the value with fire bug and it remains the same or no value at
all.With "jquery" i tried to set attribute but no attribute name value is
created. how can i set the value of text fields and then get that "html"
with the newly set value.
$("#txt").attr("value", "some value");

No comments:

Post a Comment