Setting Value in TextBox in JavaScript

As we read in our previous post how to read the value of a text field using JavaScript. Similarly it is also possible to set the value of text field using JavaScript method getElementById

Following example will explain the same


When user clicks on the Submit button then text field is filled with string value " Naveed Khan"