textboxid.runtimeStyle.background="blue";

解决方案 »

  1.   

    textboxid.style.background="blue";
      

  2.   

    我试了style="background:;"好用
    但却不知道textboxid.style.background="blue";应该写在哪里?
    再就是我怎么再将输入的文本的颜色变为白色(或其他颜色)?
      

  3.   

    比方说:
    <script>textboxid.style.background="bule"</script>
    <intput type="text" name="textboxid"> 
    文本变白就是 textboxid.style.color="white"
    其实只需要用onload就好,比如:
    <input type="text" name="textboxid" onload="this.style.background='blue';this.style.color=white">