Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

javascript set input value

<input type="text" id="example"> // Setup text field 
<script type="text/javascript"> 
  document.getElementById("example").setAttribute('value','My default value');
</script>
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #javascript #set #input
ADD COMMENT
Topic
Name
5+1 =