SyntaxFix
Write A Post
Hire A Developer
Questions
document.getElementById("fieldId").value = "Value";
or
document.forms['formId']['fieldId'].value = "Value";
document.getElementById("fieldId").setAttribute('value','Value');