Search
 
SCRIPT & CODE EXAMPLE
 

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 = "";
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: flatlist footer react native 
Javascript :: javascript run function once 
Javascript :: js alert yes no 
Javascript :: express js list all routes 
Javascript :: create hash password in js 
Javascript :: history.push.hook 
Javascript :: javascript sleep 
Javascript :: remove falsy value javascript 
Javascript :: does json only support ascii 
Javascript :: react js font awesome icon not rendering 
Javascript :: how to get orientation in js 
Javascript :: digitalocean app platform node version 
Javascript :: Concatenating variables and strings in React 
Javascript :: jquery add html to end of div 
Javascript :: javascript work out age from date of birth 
Javascript :: datalist example 
Javascript :: legacy react start 
Javascript :: reactjs absolute import 
Javascript :: query selector click event 
Javascript :: turn nodelist into array 
Javascript :: file system replace line js 
Javascript :: js how to hide an image 
Javascript :: angular int to string 
Javascript :: documentready 
Javascript :: node js sublime text 
Javascript :: javascript append to paragraph 
Javascript :: laravel ajax delete 
Javascript :: jquery on load button click 
Javascript :: how to check if a string is correctly encoded as base64 in javascript 
Javascript :: uuid v4 
ADD CONTENT
Topic
Content
Source link
Name
7+7 =