How do you put a javascript variable into the value="" of an <input> box on a <form>
This must be easy but I do not know.
How do you put a javascript variable into the value="" of an <input> box on a <form>
This must be easy but I do not know.
Value="<script type="text/javascript">document.write(yourVariableName);</script>"
You can do just:
document.getElementById('inputId').value = yourVariable;
You can also use the jQuery library, it will:
$('#inputId').val(yourVariable);