Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSS

how to change input border color with js

document.getElementById("fName").className = document.getElementById("fName").className + " error";  // this adds the error class

document.getElementById("fName").className = document.getElementById("fName").className.replace(" error", ""); // this removes the error class
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #change #input #border #color #js
ADD COMMENT
Topic
Name
2+5 =