How do I disable TextBox using JavaScript?

前端 未结 4 962
时光说笑
时光说笑 2021-02-01 23:15

earlier I asked for help disabling a Button when a drop down menu item was selected. I was given some code that did the trick but now I need the same with a Textbox and for some

4条回答
  •  傲寒
    傲寒 (楼主)
    2021-02-01 23:55

    With the help of jquery it can be done as follows.

    $("#color").prop('disabled', true);
    

提交回复
热议问题