我需要你的帮助,
如何使用下面的现有代码将周围DIV颜色的背景更改为#FFFFC4?然后回到#FFFFFF?
这是HTML:
<div class="select_wrapper"><select id="action"></select></div>
代码:
var y = document.getElementsByTagName('SELECT');
for (var i = 0; i < y.length; i++) {
y[i].onblur = function() {
this.style.backgroundColor = '#FFFFFF'
}
y[i].onfocusin = function() {
this.style.backgroundColor = '#FFFFC4'
}
}//end for