<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title></title>
<style type="text/css">
div
{
display: block;
}
.classtxt
{
width: 100px;
padding: 3px;
}
.classadd
{
background-color: Aqua;
}
.disp
{
display:block;
}
</style>
<script src="jquery-1.9.1.min.js" type="text/javascript"></script>
<script type="text/javascript">
$(function () {
$('#btn').click(function () {
//$('#divA').show(3000);
//form1中input类型中enabled
//$('#form1 input:enabled').addClass('classadd').show();//当前from中input属性的控件执行操作
//form1中所有enabled
$('#form1 :enabled').addClass('classadd').show(); //当前form中disabled="enabled"的控件
//$('#form1 input:disabled').addClass('classadd');
//$('#divB').show(3000);
//$('#form1 input:checked').addClass('classadd');//当divB中checked属性为checked的控件的css为
//$('#divC').show(3000);
//$('#span2').html($('select option:selected').text());//获取divC下span中selected属性为selected的控件
})
})
</script>
</head>
<body>
<form id="form1" runat="server">
<div id="divA">
<input id="Text1" class="classtxt" type="text" value="可用文本框" />
<input id="Text2" class="classtxt" type="text" value="不可用文本框" disabled="disabled" /></div>
<div id="divB">
<input id="Checkbox1" value="0" checked="checked" type="checkbox" />选中状态
<input id="Checkbox2" value="1" type="checkbox" />为选中状态
</div>
<div id="divC">
<select multiple="multiple">
<option value="0">item0</option>
<option value="1" selected="selected">item1</option>
<option value="2" selected="selected">item2</option>
<option value="3" >item3</option>
</select>
<span id="span2">aaaaaaaa</span>
</div>
<input type="button" value="click" id="btn" />
</form>
</body>
</html>