js实现获取焦点变为黄色。 。,?!,:✘:-#~←_←(><)O_o
那个元素获取焦点,哪个元素变黄?
代码粘贴出来
document.getElementById('xxx').onFocus = function() {
document.getElelentById('xxxxxxx').style.backgroundColor= "yellow";
}
可以不用js实现,纯css,要变黄的元素加个如 class="active"
.active:hover{
cursor: pointer;
color: yellow;
}