<select>
<option style=color:red>red
<option style=color:blue>blue
<option style=color:green>green
<option style=color:black>black
</select>

解决方案 »

  1.   

    颜色模板
    <HTML>
    <HEAD>
    <TITLE>Select Color</TITLE><STYLE TYPE="text/css">
     BODY   {margin-left:10; font-family:Verdana; font-size:12; background:menu}
     BUTTON {width:5em}
     P      {text-align:center}
     TABLE  {cursor:hand}
    </STYLE><SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onclick>
    <!--
      SelColor.value = event.srcElement.title;
    // -->
    </SCRIPT><SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseover>
    <!--
      text = event.srcElement.title;
      if ( text != event.srcElement.bgColor )
        text += " (" + event.srcElement.bgColor + ")";
      RGB.innerText = text;
    // -->
    </SCRIPT><SCRIPT LANGUAGE=JavaScript FOR=ColorTable EVENT=onmouseout>
    <!--
      RGB.innerText = " ";
    // -->
    </SCRIPT><SCRIPT LANGUAGE=JavaScript FOR=Ok EVENT=onclick>
    <!--
      window.returnValue = SelColor.value;
      window.close();
    // -->
    </SCRIPT></HEAD><BODY onload="SelColor.focus()"><DIV> &nbsp; </DIV>
    <P>
    <TABLE ID=ColorTable BORDER=1 BORDERCOLOR="silver" BORDERCOLORLIGHT="white" BORDERCOLORDARK="black" CELLSPACING=0 CELLPADDING=0>
    <TR>
       <TD BGCOLOR=aliceblue TITLE=aliceblue>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=antiquewhite TITLE=antiquewhite>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=aqua TITLE=aqua>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=aquamarine TITLE=aquamarine>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=azure TITLE=azure>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=beige TITLE=beige>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=bisque TITLE=bisque>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=black TITLE=black>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=blanchedalmond TITLE=blanchedalmond>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=blue TITLE=blue>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=blueviolet TITLE=blueviolet>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=brown TITLE=brown>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=burlywood TITLE=burlywood>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=cadetblue TITLE=cadetblue>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=chartreuse TITLE=chartreuse>&nbsp;&nbsp;&nbsp;
       <TD BGCOLOR=chocolate TITLE=chocolate>&nbsp;&nbsp;&nbsp;
    <TR>
       <TD BGCOLOR=coral TITLE=coral>&nbsp;&nbsp;
       <TD BGCOLOR=cornflower TITLE=cornflower>&nbsp;&nbsp;
       <TD BGCOLOR=cornsilk TITLE=cornsilk>&nbsp;&nbsp;
       <TD BGCOLOR=crimson TITLE=crimson>&nbsp;&nbsp;
       <TD BGCOLOR=cyan TITLE=cyan>&nbsp;&nbsp;
       <TD BGCOLOR=darkblue TITLE=darkblue>&nbsp;&nbsp;
       <TD BGCOLOR=darkcyan TITLE=darkcyan>&nbsp;&nbsp;
       <TD BGCOLOR=darkgoldenrod TITLE=darkgoldenrod>&nbsp;&nbsp;
       <TD BGCOLOR=darkgray TITLE=darkgray>&nbsp;&nbsp;
       <TD BGCOLOR=darkgreen TITLE=darkgreen>&nbsp;&nbsp;
       <TD BGCOLOR=darkkhaki TITLE=darkkhaki>&nbsp;&nbsp;
       <TD BGCOLOR=darkmagenta TITLE=darkmagenta>&nbsp;&nbsp;
       <TD BGCOLOR=darkolivegreen TITLE=darkolivegreen>&nbsp;&nbsp;
       <TD BGCOLOR=darkorange TITLE=darkorange>&nbsp;&nbsp;
       <TD BGCOLOR=darkorchid TITLE=darkorchid>&nbsp;&nbsp;
       <TD BGCOLOR=darkred TITLE=darkred>&nbsp;&nbsp;
      

  2.   

    <TR>
       <TD BGCOLOR=darksalmon TITLE=darksalmon>&nbsp;&nbsp;
       <TD BGCOLOR=darkseagreen TITLE=darkseagreen>&nbsp;&nbsp;
       <TD BGCOLOR=darkslateblue TITLE=darkslateblue>&nbsp;&nbsp;
       <TD BGCOLOR=darkslategray TITLE=darkslategray>&nbsp;&nbsp;
       <TD BGCOLOR=darkturquoise TITLE=darkturquoise>&nbsp;&nbsp;
       <TD BGCOLOR=darkviolet TITLE=darkviolet>&nbsp;&nbsp;
       <TD BGCOLOR=deeppink TITLE=deeppink>&nbsp;&nbsp;
       <TD BGCOLOR=deepskyblue TITLE=deepskyblue>&nbsp;&nbsp;
       <TD BGCOLOR=dimgray TITLE=dimgray>&nbsp;&nbsp;
       <TD BGCOLOR=dodgerblue TITLE=dodgerblue>&nbsp;&nbsp;
       <TD BGCOLOR=firebrick TITLE=firebrick>&nbsp;&nbsp;
       <TD BGCOLOR=floralwhite TITLE=floralwhite>&nbsp;&nbsp;
       <TD BGCOLOR=forestgreen TITLE=forestgreen>&nbsp;&nbsp;
       <TD BGCOLOR=fuchia TITLE=fuchia>&nbsp;&nbsp;
       <TD BGCOLOR=gainsboro TITLE=gainsboro>&nbsp;&nbsp;
       <TD BGCOLOR=ghostwhite TITLE=ghostwhite>&nbsp;&nbsp;
    <TR>
       <TD BGCOLOR=gold TITLE=gold>&nbsp;&nbsp;
       <TD BGCOLOR=goldenrod TITLE=goldenrod>&nbsp;&nbsp;
       <TD BGCOLOR=gray TITLE=gray>&nbsp;&nbsp;
       <TD BGCOLOR=green TITLE=green>&nbsp;&nbsp;
       <TD BGCOLOR=greenyellow TITLE=greenyellow>&nbsp;&nbsp;
       <TD BGCOLOR=honeydew TITLE=honeydew>&nbsp;&nbsp;
       <TD BGCOLOR=hotpink TITLE=hotpink>&nbsp;&nbsp;
       <TD BGCOLOR=indianred TITLE=indianred>&nbsp;&nbsp;
       <TD BGCOLOR=indigo TITLE=indigo>&nbsp;&nbsp;
       <TD BGCOLOR=ivory TITLE=ivory>&nbsp;&nbsp;
       <TD BGCOLOR=khaki TITLE=khaki>&nbsp;&nbsp;
       <TD BGCOLOR=lavender TITLE=lavender>&nbsp;&nbsp;
       <TD BGCOLOR=lavenderblush TITLE=lavenderblush>&nbsp;&nbsp;
       <TD BGCOLOR=lawngreen TITLE=lawngreen>&nbsp;&nbsp;
       <TD BGCOLOR=lemonchiffon TITLE=lemonchiffon>&nbsp;&nbsp;
       <TD BGCOLOR=lightblue TITLE=lightblue>&nbsp;&nbsp;
    <TR>
       <TD BGCOLOR=lightcoral TITLE=lightcoral>&nbsp;&nbsp;
       <TD BGCOLOR=lightcyan TITLE=lightcyan>&nbsp;&nbsp;
       <TD BGCOLOR=lightgoldenrodyellow TITLE=lightgoldenrodyellow>&nbsp;&nbsp;
       <TD BGCOLOR=lightgreen TITLE=lightgreen>&nbsp;&nbsp;
       <TD BGCOLOR=lightgrey TITLE=lightgrey>&nbsp;&nbsp;
       <TD BGCOLOR=lightpink TITLE=lightpink>&nbsp;&nbsp;
       <TD BGCOLOR=lightsalmon TITLE=lightsalmon>&nbsp;&nbsp;
       <TD BGCOLOR=lightseagreen TITLE=lightseagreen>&nbsp;&nbsp;
       <TD BGCOLOR=lightskyblue TITLE=lightskyblue>&nbsp;&nbsp;
       <TD BGCOLOR=lightslategray TITLE=lightslategray>&nbsp;&nbsp;
       <TD BGCOLOR=lightsteelblue TITLE=lightsteelblue>&nbsp;&nbsp;
       <TD BGCOLOR=lightyellow TITLE=lightyellow>&nbsp;&nbsp;
       <TD BGCOLOR=lime TITLE=lime>&nbsp;&nbsp;
       <TD BGCOLOR=limegreen TITLE=limegreen>&nbsp;&nbsp;
       <TD BGCOLOR=linen TITLE=linen>&nbsp;&nbsp;
       <TD BGCOLOR=magenta TITLE=magenta>&nbsp;&nbsp;
    <TR>
       <TD BGCOLOR=maroon TITLE=maroon>&nbsp;&nbsp;
       <TD BGCOLOR=mediumaquamarine TITLE=mediumaquamarine>&nbsp;&nbsp;
       <TD BGCOLOR=mediumblue TITLE=mediumblue>&nbsp;&nbsp;
       <TD BGCOLOR=mediumorchid TITLE=mediumorchid>&nbsp;&nbsp;
       <TD BGCOLOR=mediumpurple TITLE=mediumpurple>&nbsp;&nbsp;
       <TD BGCOLOR=mediumseagreen TITLE=mediumseagreen>&nbsp;&nbsp;
       <TD BGCOLOR=mediumslateblue TITLE=mediumslateblue>&nbsp;&nbsp;
       <TD BGCOLOR=mediumspringgreen TITLE=mediumspringgreen>&nbsp;&nbsp;
       <TD BGCOLOR=mediumturquoise TITLE=mediumturquoise>&nbsp;&nbsp;
       <TD BGCOLOR=mediumvioletred TITLE=mediumvioletred>&nbsp;&nbsp;
       <TD BGCOLOR=midnightblue TITLE=midnightblue>&nbsp;&nbsp;
       <TD BGCOLOR=mintcream TITLE=mintcream>&nbsp;&nbsp;
       <TD BGCOLOR=mistyrose TITLE=mistyrose>&nbsp;&nbsp;
       <TD BGCOLOR=moccasin TITLE=moccasin>&nbsp;&nbsp;
       <TD BGCOLOR=navajowhite TITLE=navajowhite>&nbsp;&nbsp;
       <TD BGCOLOR=navy TITLE=navy>&nbsp;&nbsp;
    <TR>
       <TD BGCOLOR=oldlace TITLE=oldlace>&nbsp;&nbsp;
       <TD BGCOLOR=olive TITLE=olive>&nbsp;&nbsp;
       <TD BGCOLOR=olivedrab TITLE=olivedrab>&nbsp;&nbsp;
       <TD BGCOLOR=orange TITLE=orange>&nbsp;&nbsp;
       <TD BGCOLOR=orangered TITLE=orangered>&nbsp;&nbsp;
       <TD BGCOLOR=orchid TITLE=orchid>&nbsp;&nbsp;
       <TD BGCOLOR=palegoldenrod TITLE=palegoldenrod>&nbsp;&nbsp;
       <TD BGCOLOR=palegreen TITLE=palegreen>&nbsp;&nbsp;
       <TD BGCOLOR=paleturquoise TITLE=paleturquoise>&nbsp;&nbsp;
       <TD BGCOLOR=palevioletred TITLE=palevioletred>&nbsp;&nbsp;
       <TD BGCOLOR=papayawhip TITLE=papayawhip>&nbsp;&nbsp;
       <TD BGCOLOR=peachpuff TITLE=peachpuff>&nbsp;&nbsp;
       <TD BGCOLOR=peru TITLE=peru>&nbsp;&nbsp;
       <TD BGCOLOR=pink TITLE=pink>&nbsp;&nbsp;
       <TD BGCOLOR=plum TITLE=plum>&nbsp;&nbsp;
       <TD BGCOLOR=powderblue TITLE=powderblue>&nbsp;&nbsp;
    <TR>
       <TD BGCOLOR=purple TITLE=purple>&nbsp;&nbsp;
       <TD BGCOLOR=red TITLE=red>&nbsp;&nbsp;
       <TD BGCOLOR=rosybrown TITLE=rosybrown>&nbsp;&nbsp;
       <TD BGCOLOR=royalblue TITLE=royalblue>&nbsp;&nbsp;
       <TD BGCOLOR=saddlebrown TITLE=saddlebrown>&nbsp;&nbsp;
       <TD BGCOLOR=salmon TITLE=salmon>&nbsp;&nbsp;
       <TD BGCOLOR=sandybrown TITLE=sandybrown>&nbsp;&nbsp;
       <TD BGCOLOR=seagreen TITLE=seagreen>&nbsp;&nbsp;
       <TD BGCOLOR=seashell TITLE=seashell>&nbsp;&nbsp;
       <TD BGCOLOR=sienna TITLE=sienna>&nbsp;&nbsp;
       <TD BGCOLOR=silver TITLE=silver>&nbsp;&nbsp;
       <TD BGCOLOR=skyblue TITLE=skyblue>&nbsp;&nbsp;
       <TD BGCOLOR=slateblue TITLE=slateblue>&nbsp;&nbsp;
       <TD BGCOLOR=slategray TITLE=slategray>&nbsp;&nbsp;
       <TD BGCOLOR=snow TITLE=snow>&nbsp;&nbsp;
       <TD BGCOLOR=springgreen TITLE=springgreen>&nbsp;&nbsp;
    <TR>
       <TD BGCOLOR=steelblue TITLE=steelblue>&nbsp;&nbsp;
       <TD BGCOLOR=tan TITLE=tan>&nbsp;&nbsp;
       <TD BGCOLOR=teal TITLE=teal>&nbsp;&nbsp;
       <TD BGCOLOR=thistle TITLE=thistle>&nbsp;&nbsp;
       <TD BGCOLOR=tomato TITLE=tomato>&nbsp;&nbsp;
       <TD BGCOLOR=turquoise TITLE=turquoise>&nbsp;&nbsp;
       <TD BGCOLOR=violet TITLE=violet>&nbsp;&nbsp;
       <TD BGCOLOR=wheat TITLE=wheat>&nbsp;&nbsp;
       <TD BGCOLOR=white TITLE=white>&nbsp;&nbsp;
       <TD BGCOLOR=whitesmoke TITLE=whitesmoke>&nbsp;&nbsp;
       <TD BGCOLOR=yellow TITLE=yellow>&nbsp;&nbsp;
       <TD BGCOLOR=yellowgreen TITLE=yellowgreen>&nbsp;&nbsp;
    </TABLE><P>
    <LABEL FOR=SelColor>Palette:</LABEL>
    <INPUT TYPE=TEXT SIZE=20 ID=SelColor>
    <BR>
    <SPAN ID=RGB>&nbsp;</SPAN><P>
    <BUTTON ID=Ok TYPE=SUBMIT>Select</BUTTON>
    <BUTTON ONCLICK="window.close();">Close</BUTTON></BODY>
    </HTML>
      

  3.   

    我不同意^^
    <select>
    <option style="color:red">red</option>
    <option style="color:blue">blue</option>
    <option style="color:green">green</option>
    <option style="color:black">black</option>
    </select>
      

  4.   

    <select onchange="document.body.style.background=this.value"> 
      <option value=white>请选择颜色 
      <option value=red style="background: red"> 
      <option value=blue style="background: blue"> 
      <option value=yellow style="background: yellow"> 
      <option value=green style="background: green"> 
    </select>