Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

clear input field data on button click

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

function ClearFields() {

     document.getElementById("textfield1").value = "";
     document.getElementById("textfield2").value = "";
}
 
PREVIOUS NEXT
Tagged: #clear #input #field #data #button #click
ADD COMMENT
Topic
Name
8+4 =