Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript set input value by id

<input type="text" id="example">
<input type="submit" value="Submit" onclick="document.getElementById('example').setAttribute('value','My default value')">
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #set #input #id
ADD COMMENT
Topic
Name
4+4 =