Drop Down MenusCSS Drop Down MenuPure CSS Dropdown Menu

Thursday, September 29, 2011

Option changes event

<

head>

<

style>

.important

{ background-color:yellow; } .sorta-important { background-color:lightyellow; }

</

style>

<title>Untitled Page</title>

</

head>

<

body>

<

select onchange="this.className=this.options[this.selectedIndex].className" class="important"> <option class="important" selected="selected">Item 1</option> <option class="sorta-important">Item 2</option> </select>

</

body>

</

html>

No comments: