javascript assign value to textbox code example
Example 1: Javascript get text input value
var inputValue = document.getElementById("myTextInputID").value;
Example 2: javascript how to set a textbox value to nothing
<input id="text">
<button onclick="myFunction()">Run</button>
<script>
function myFunction() {
document.getElementById("text").value = "";
}
</script>