Answers for "how to change input border color with js"

0

change input border color when selected

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

javascript for border color

var getColor = prompt("Choose your color ", "Enter the  color ");
 var color;
 var el = document.getElementById("color");
 el.innerHTML = "Whatever paragraph message.";
 if (getColor =="Yellow" || getColor =="yellow" || getColor =="YELLOW"){
     color = "#FFFF66";
     el.style.borderColor = color;
 }
Posted by: Guest on April-27-2020
0

javascript for border color

.borders{
    background-color:#00ffff;
    border-color:#000000;
    border-width:2px;
    border-style:solid;
}
Posted by: Guest on April-27-2020
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 "how to change input border color with js"

Code answers related to "Javascript"

Browse Popular Code Answers by Language