Hello!

There was a problem that the color of the text in the input with the disabled attribute is gray. Using CSS only changes in chrome and IE10. Is it possible to change the color in them?

There is an option - to prohibit editing the field with pom. jQuery But I don’t know how .. The options I’ve seen suggest setting the disabled attribute using jQuery, which leads back to the problem.

And finally, the idea remained - to block these inputs from the top with a transparent block.

    2 answers 2

    $('input:disabled').css('background-color', 'gray'); 

    Here it changes to blue: http://jsfiddle.net/PjCeJ/

    If you want to change the text color, then:

     $('input:disabled').css('color', 'gray'); 
    • If you want to change the text color, then so: $ ('input: disabled'). Css ('color', 'gray'); - stasQa

    The easiest way is to prohibit change in other ways and change anything:

     <input type="text" readonly="readonly" onselectstart="return false;" onfocus="this.blur();" value="Проверка" style="color:#B00B00;">