<HTML> <HEAD> <TITLE>石家庄渣浆泵配件</TITLE> </HEAD> <SCRIPT> <!-- function bgChange(selObj) { newColor = selObj.options[selObj.selectedIndex].text; document.bgColor = newColor; selObj.selectedIndex = -1; } //--> </SCRIPT> <BODY STYLE="font-family:Arial"> <B>Changing Background Colors</B> <BR> <FORM> <SELECT SIZE="8" onChange="bgChange(this);"> <OPTION>Red <OPTION>Orange <OPTION>Yellow <OPTION>Green <OPTION>Blue <OPTION>Indigo <OPTION>Violet <OPTION>White </SELECT> </FORM> <br /> </BODY> </HTML>
用JS让下拉框改变网页背景颜色,布布扣,bubuko.com
原文:http://www.cnblogs.com/youtianxia/p/3867570.html