Skip to Content
avatar image
Former Member

drop down box

Hi,

could you give me any tip to make a selected entry with color for drop down box:

For the text it works good to mark up a color( with java script), but

I would like to mark up a selected entry with "red color" or "yellow color in drow down box.

Any help would be appreciated.

Thanks.

Gauguin

Edited by: Gauguin on Jul 12, 2009 7:43 AM

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Best Answer
    Jul 12, 2009 at 11:06 AM

    the js syntax for coloring the selected value is

    DDLB = document.getElementById('DDLBID');
    DDLB.options[DDLB.selectedIndex].style.background = "red" ;
    

    Add comment
    10|10000 characters needed characters exceeded