<table border="1" width="100" height=100 id=t>
  <tr>
    <td width="100%">fason</td>
  </tr>
</table>
<select onchange="t.style.color=value">
<option value='red'>red
<option value='blue'>blue
<option value='green'>green
</select>

解决方案 »

  1.   

    <font id=font1 color="#00000">文字</font>
    <select onchange="font1.color=this.value">
    <option value="#000000">#000000</option>
    <option value="#ff0000">#ff0000</option>
    <option value="#00ffff">#00ffff</option>
    </select>
      

  2.   

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    </head><body>
    <table   width="100%" height="126" border="1" id="t">
      <tr>
        <td bgcolor="#FFFFFF" bordercolor="#FFFFFF">dsadadsa</td>
      </tr>
    </table>
    <form method="POST" action="">
      <p>
      <select size="1" name="D1" onchange="t.style.background=value">\\改变边框颜色
      <option value='red'>red 
        <option value='blue'>blue 
        <option value='green'>green 
        </select></p>
        <p>
      <select size="1" name="D2" onchange="t.style.color=value">\\改变字体颜色
      <option value='red'>red 
        <option value='blue'>blue 
        <option value='green'>green 
        </select></p></form>
    </body>
    </html>
      

  3.   

    道理相同的嘛
    <table border="1" width="100" height=100 id=t>
      <tr>
        <td width="100%">fason</td>
      </tr>
    </table>
    <font id=f color="#00000">文字</font>
    <select onchange="t.style.backgroundColor=value.split('|')[0];f.color=value.split('|')[1]">
    <option value="#000000|#ff0000">#000000</option>
    <option value="#ff0000|#000000">#ff0000</option>
    <option value="#00ffff|#ff00ff">#00ffff</option>
    </select>
      

  4.   

    <html>
    <head>
    <title>Untitled Document</title>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <script language="javascript">
    function changecolor(new_color1,new_color2){
    t.style.background=new_color1;
    t.style.color=new_color2}
    </script>
    </head><body>
    <table   width="100%" height="126" border="1" id="t">
      <tr>
        <td bgcolor="#FFFFFF" bordercolor="#FFFFFF">dsadadsa</td>
      </tr>
    </table>
    </form>
    <form method="POST" action="--WEBBOT-SELF--">
     
      <p><input type="button" value="红和蓝" name="B1" onclick="changecolor('red','blue')">
      <input type="button" value="黄和绿" name="B2" onclick="changecolor('yellow','green')"></p>
    </form>
    </body>
    </html>/////用按钮也可以实现