Answers for "js set text field empty"

0

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>
Posted by: Guest on September-23-2020

Browse Popular Code Answers by Language