<input type="text" readonly value="" name="txt">

解决方案 »

  1.   

    <INPUT type="text" id=text1 name=text1 value="这是一个只读文本框" readonly>
      

  2.   

    我想要那种input编程灰色 不能被选择 别人一看就能知道的那种 readonly 外观没变化
      

  3.   

    css可以这样模拟disabled的效果
    <style>
    .readonly {
    color: #9D9D9D;
    }
    </style>
    <input value="fdasfasd" class="readonly" readonly>
    或者
    <input value="fdasfasd" style="color:#9D9D9D" readonly>
      

  4.   

    <style>
    .readonly {
    benc:expression(this.disabled=true)
    }
    </style>
    <input value="fdasfasd" class="readonly">
      

  5.   

    to hazeline:<select readonly>
    </select>能够被选择 看来只能disabled加hidden了
      

  6.   

    to bencalie:这样相当于disabled,对吧?
    benc:expression是什么意思?  给咱们讲讲  :)
      

  7.   

    <select onchange="this.selectedIndex=0">
    </select>
      

  8.   

    benc:expression其中的benc可以使任意的字符串,例如:webraider,expression表示给该元素增加的css属性benc的值是expression表达式的执行结果