Search
 
SCRIPT & CODE EXAMPLE
 

HTML

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>
Comment

PREVIOUS NEXT
Code Example
Html :: how can i make that user cant input sonething textbx 
Html :: displa text in html 
Html :: ionic button trigger ion-datetime 
Html :: html video fullscreen 
Html :: if else if vue 
Html :: html button with link 
Html :: form multipart/form-data 
Html :: html bottom right corner 
Html :: html redirecting to previous page 
Html :: bootstrap colored link 
Html :: bootstrap latest version cdn 
Html :: reactstrap input background color when autocomplete 
Html :: moment in html 
Html :: data list in input tag html 
Html :: php prevent form resubmission 
Html :: como cambiar la fuente de letra en html 
Html :: how to remove glow around button html 
Html :: add delay to hrefs 
Html :: how to add datepicker in bootstrap(html form) 
Html :: html input submit size width 
Html :: laravel route sub domain routing 
Html :: html escape quote in atribute 
Html :: html input date min 
Html :: display file pdf in html 
Html :: file_put_contents(/var/www/demo.onlineexammanagement.com/public_html/storage/framework/cache/data/ea/83/ea83c7b371f7573de3cd055cea9229af0b0541e5): failed to open stream: No such file or directory 
Html :: Translate Text html in magento 2 
Html :: autocomplete off input 
Html :: how to add label on image in html 
Html :: html add vertical space below 
Html :: contenteditable html 
ADD CONTENT
Topic
Content
Source link
Name
4+4 =