Answers for "clear input field data on button click"

1

clear input field data on button click

<button type="button" onclick="ClearFields();">Clear</button>

function ClearFields() {

     document.getElementById("textfield1").value = "";
     document.getElementById("textfield2").value = "";
}
Posted by: Guest on September-06-2021

Code answers related to "clear input field data on button click"

Code answers related to "Javascript"

Browse Popular Code Answers by Language