how to change input border color with js
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;
}
.borders{
background-color:#00ffff;
border-color:#000000;
border-width:2px;
border-style:solid;
}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
Also in JavaScript:
- try catch throwing error in javascript
- jquery get data attribute value
- slide when mouse over gadget jquery
- update angular website firebase
- ejecutar una funcion js con id html usando jquery
- json file example
- Write a regular expression to validate phone number in XXX-XXX-XXXX format?
- pa mmj portal
- js if
- useBootstrapPrefixhttp://localhost:8000/static/js/bundle.js:15261:75
- js get element by attribute
- in select option how to make one default in angular
- rotation in p5 play
- node close rabbitmq connection
- javascript css
- delete backspace on string js
- python serialization json marshmallow
- moving a item fro index to another index, javascript
- switch (new date().getday())
- reverse a string program in javascript
- angular viewchild set attribute
- js use await in synchronous method
- if json valide js
- check if element is last child jquery