How to change font-color for disabled input?

后端 未结 10 1102
逝去的感伤
逝去的感伤 2020-12-02 12:48

I need to change the style for a disabled input element in CSS.



        
10条回答
  •  清歌不尽
    2020-12-02 13:41

    It is the solution that I found for this problem:

    //If IE

    inputElement.writeAttribute("unselectable", "on");

    //Other browsers

    inputElement.writeAttribute("disabled", "disabled");

    By using this trick, you can add style sheet to your input element that works in IE and other browsers on your not-editable input box.

提交回复
热议问题