$("#hutNew").find("td").each(function () { if ($(this).attr('style') == 'background:rgb(34, 139, 34)') { $(this).css({ "width": "140px", "cursor": "pointer" }); } else if ($(this).attr('style') == 'background:none') { $(this).css("background", "rgb(85, 85, 85)"); } });
定义cssclass用class来找
定义cssclass用class来找
具体说一下
.backcolor{background:rgb(34, 139, 34)} if($(this).attr('class')=="backcolor"){//}
.backcolor{background:rgb(34, 139, 34)} if($(this).attr('class')=="backcolor"){//}
.backcolor{background:rgb(34, 139, 34)} if($(this).attr('class')=="backcolor"){//} 好吧 试过了 不行
.backcolor{background:rgb(34, 139, 34)} if($(this).attr('class')=="backcolor"){//} Copyright © 2019- zipou.cn 版权所有
违法及侵权请联系:TEL:199 18 7713 E-MAIL:2724546146@qq.com
本站由北京市万商天勤律师事务所王兴未律师提供法律服务