inputtext.disabled=true;  不可用
inputtext.readonly=true;  不可写

解决方案 »

  1.   

    <input name=t1 size=20>
    <input type=button value=ok onclick="t1.disabled = t1.disabled?false:true;">
      

  2.   

    inputtext.disabled=true;这句不管用啊,我是按钮下拉列表中选定的值判断的,如果为1可用,为0不可用
      

  3.   

    <input name=t1 size=20 disabled>
    <select onchange="t1.disabled = this.value=='1'?false:true;">
    <option value=0>0
    <option value=1>1
    </select>try~~~
      

  4.   

    回复人: zltostem(尘寞) ( ) 信誉:104 
    是可以的,自己试试才知道
      

  5.   

    可以的,我试过了。除了readonly/disabled外,还可以用visibility属性能。
      

  6.   

    <input readonly type=""...>
      

  7.   

    1  disabled=true;  不可用2  或用javascript来控制起光标的进入而达到效果
    function aa(){
    document.form1.text1.vlaue.onfocusout())
    abc=setTimeout("aa()";10)
    }
    aa();3
    function bb(){
    if(document.form1.text1.onfocus(){
    document.form1.text2.onfocus()
    }
    }
    <body>
    <form name="from1" action="">
    <input type=text name="text1" >
    <input type=text name="text2">
    </form>
    </body>
      

  8.   

    readonly=false 好像不能恢复可写状态