1

I need your help,

How can I, using the existing code below, also change the background of the surrounding DIV color to #FFFFC4? and then back to #FFFFFF?

Here's the HTML:

<div class="select_wrapper"><select id="action"></select></div>

Code:

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
John Smith
  • 1,639
  • 11
  • 36
  • 51

0 Answers0