禁用下拉列表已启用(仅查看) [英] make disabled dropdown as enabled(only look)

查看:115
本文介绍了禁用下拉列表已启用(仅查看)的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

禁用下拉列表已启用(仅查看)

但已禁用的功能应与

make disabled dropdown as enabled(only look)
but disabled functionality should be same as it is

推荐答案

相同通过以下方式: -



i)为禁用的组合框创建您想要设置的样式(类似于启用的文本框)。

让说类名是' .disabledNewStyle '。

ii)在jQuery中获取禁用的组合框并添加新类。

让说禁用的组合框ID是' cmbDisabled '。



现在你可以这样做: -



You can do in the following way :-

i) Create the style you want to set for the disabled combobox(similar to enabled text box).
Let say the class name is '.disabledNewStyle'.
ii) Get the disabled combobox in jQuery and add the new class to it.
Let say the disabled combobox ID is 'cmbDisabled'.

Now you can do like below :-


#cDDisabled:disabled)。addClass(' disabledNewStyle');
( "#cmbDisabled:disabled" ).addClass('disabledNewStyle');



//你也可以使用'.css'方法直接添加样式,并使'!important'覆盖以前的样式。


// also you can use '.css' method to add styles directly and make it '!important' to override previous styles.


# cmbDisabled:禁用)。css( color black!important);
( "#cmbDisabled:disabled" ).css("color", "black !important");


这篇关于禁用下拉列表已启用(仅查看)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆