呵呵,你是想把输入框的背景色变为灰色啊 ,用CSS啊

解决方案 »

  1.   

    input {
    background-color: #CCCCCC;
    }
    重定义INPUT标签
      

  2.   

    想變為隻讀用readonly ;
    <input type="text" name="text1" readonly >
    想把输入框的背景色变为灰色,可以用CSS。
      

  3.   

    disabled 是对checkbox灰显的
    style.backGroundColor="gray"?
      

  4.   

    想把输入框的背景色变为灰色,像這樣:
    input {
    background-color: #CCCCCC;
    }
      

  5.   

    有三种方法,不知道你说的是哪一种意思?
    1.<input type="text" value="欢迎光临" disabled=true>
    2.<input type="text" value="欢迎光临" readonly>
    3.<input type="text" value="欢迎光临" style="background-color:#cccccc">
    1,2中的文字不可编辑,1中文字变灰
    3仅仅让背景变灰
    如需把1,2中背景变灰,把3中的style代码加进去