Jquery操作元素的属性和css

<button id="problem_chart_search" type="confirm" style="margin: 0 3em;color: #fff;font-size:.75em;padding: 2px 10px;">搜索</button>
//1、改属性
$('#problem_chart_search').attr("disabled", "disabled");
1.1去除属性

$('#problem_chart_search').removeAttr("disabled")

//2、改CSS
$('#problem_chart_search').css("background-color","#d4d4d4");
 
2.1 移除Css
$('#problem_chart_search').removeCss"background-color");
posted @ 2023-07-05 18:45  信铁寒胜  阅读(12)  评论(0编辑  收藏  举报