Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

set html value javascript

To change the value of an HTML attribute, use this syntax:
document.getElementById(id).attribute = new value;

to set the value: 
document.getElementById("id").value = "New Value Text";
 
PREVIOUS NEXT
Tagged: #set #html #javascript
ADD COMMENT
Topic
Name
2+2 =