Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR HTML

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>
 
PREVIOUS NEXT
Tagged: #javascript #set #textbox
ADD COMMENT
Topic
Name
7+3 =