How would you set the default value of a form text field in JavaScript?
if your form contains an input field like
then you can write the code in javascript as given below to set its value as
document.getElementById('id1').value='text to be displayed' ;