change input border color when selected
input:focus {
outline: none;
border: 1px solid red;
}
change input border color when selected
input:focus {
outline: none;
border: 1px solid red;
}
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;
}
javascript for border color
.borders{
background-color:#00ffff;
border-color:#000000;
border-width:2px;
border-style:solid;
}
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
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us