jQuery MiniUI

标题: input输入框的背景色 [打印本页]

作者: manyunlai    时间: 2015-8-10 17:57:40     标题: input输入框的背景色

我想在validate验证时发生错误的输入框的背景色设成红色,怎么总是被盖住呢?
    <style type="text/css">
        .myErrorBackgroundColor
        {
            background-color:Red;
        }
    </style>

<input id="name" name="name" class="mini-textbox" errorMode="none" vtype="email;rangeLength:5,20"/>

<script type="text/javascript">
        function addError(control, errorText) {
            。。。。。。
            control.addCls("myErrorBackgroundColor");
            。。。。。。
        }

现在的效果:



作者: manyunlai    时间: 2015-8-10 18:01:29

[attach]6473[/attach]

作者: dforce    时间: 2015-8-11 09:28:05

manyunlai 发表于 2015-8-10 18:01

.myErrorBackgroundColor .mini-textbox-input,.myErrorBackgroundColor .mini-textbox-border
        {
            background-color:Red;
        }
作者: manyunlai    时间: 2015-8-11 11:46:31

dforce 发表于 2015-8-11 09:28
.myErrorBackgroundColor .mini-textbox-input,.myErrorBackgroundColor .mini-textbox-border
         ...

谢谢!
按照您的提示OK了。





欢迎光临 jQuery MiniUI (http://miniui.com/discuss/) Powered by Discuz! X2