Answers for "input click border color change js"

CSS
1

change input border color when selected

input:focus {
	outline: none;
  	border: 1px solid red;
}
Posted by: Guest on February-05-2021
0

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
Posted by: Guest on January-20-2021

Code answers related to "input click border color change js"

Browse Popular Code Answers by Language