尝试这个:
.greenText{ background-color:green; }.blueText{ background-color:blue; }.redText{ background-color:red; }<select onchange="this.className=this.options[this.selectedIndex].className" > <option value="apple" >Apple</option> <option value="banana" >Banana</option> <option value="grape" >Grape</option></select>


