Jak zmienić kolor tła pola typu text w JS ?
0
0
ale po co w JS? nie lepiej w CSS?
input {
background-color: #68DA7B;
}
input:focus {
background-color: #FFEE50;
}
ewentualnie jak juz musisz tego JS uzyc, to:
document.getElementById('Id_inputa').style.backgroundColor='#FF0000'