Answers for "button clear event"

0

how to make a clear button in javascript

<script>
  function clear_inputs(){
    inputs=document.getElementsByClassName('inputs')
    for(input of inputs){
    	input.value=' ' ///this emptys the inputs
    }
  }
</script>
<input class='inputs' type="text">
<input class='inputs' type="text">
<input class='inputs' type="text">

<button onclick='clear_inputs()'>Clear</button>
Posted by: Guest on May-27-2021
0

reset button javascript onclick

<form onreset="Reset()">
</form>
<script>
function Reset() {  }
</script>
Posted by: Guest on July-17-2021

Browse Popular Code Answers by Language