Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

how to check if all inputs are not empty with javascript

const inputFeilds = document.querySelectorAll("input");

const validInputs = Array.from(inputFeilds).filter( input => input.value !== "");

console.log(validInputs) //[array with valid inputs]
 
PREVIOUS NEXT
Tagged: #check #inputs #empty #javascript
ADD COMMENT
Topic
Name
4+2 =