Search
 
SCRIPT & CODE EXAMPLE
 

JAVASCRIPT

js find :invalid inside div

var contactForm = document.getElementById('contact-form');
if (contactForm.checkValidity() == false) {
    var list = contactForm.querySelectorAll(':invalid');
    for (var item of list) {
        item.setAttribute("style", "background-color: red;")
    }
}
Comment

PREVIOUS NEXT
Code Example
Javascript :: update mongoose 
Javascript :: js letter animation 
Javascript :: create a virtual reality website using react js 
Javascript :: dev console with colored font 
Javascript :: how to check if a string contains a specific word in javascript 
Javascript :: atomic design with redux 
Javascript :: fetchapi snippet 
Javascript :: sum the two first minimum numbers in an array 
Javascript :: get members of a group graph pnp js 
Javascript :: string to number javascript & remove text 
Javascript :: search fullname in angular 
Javascript :: props with ternary in react 
Javascript :: javascript to send email on button click 
Javascript :: Caret.editorconfig 
Javascript :: return a specific value filter javascript 
Javascript :: rebuild package-lock.json 
Javascript :: express plus make router 
Javascript :: jquery element by name 
Javascript :: dummy servers using nodejs 
Javascript :: filtering buttons parseint javascript 
Javascript :: occurences of special character in a string javascript 
Javascript :: online js to typescript converter 
Javascript :: how to signup users without login in firebase js 
Javascript :: experess Routing 
Javascript :: guage chart highchart codepen 
Javascript :: mongo look for substring of field 
Javascript :: limit ajax request 
Javascript :: javascript change color of button onclick 
Javascript :: blue pring GUI react 
Javascript :: imleç 
ADD CONTENT
Topic
Content
Source link
Name
1+8 =