set value attr javascript code example
Example 1: set value using javascript
document.getElementById("myText").value = "your string";
Example 2: set attribute javascript
Element.setAttribute(name, value);
document.getElementById("myText").value = "your string";
Element.setAttribute(name, value);