摘要:<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <meta name="viewport" content="width=device-width, initial
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>jquery表单选择器</title>
<script src="jquery/jquery-3.3.1.js" type="text/javascript" charset="utf-8"></script>
<style type="text/css">
/* div{width: 100px;height: 100px;background: #ccc;margin-top: 20px;} */
</style>
</head>
<body>
<script type="text/javascript">
$(document).ready(function(){
// $(':enabled').css('background','pink')
// $(':disabled').css('background','red')
// $(':selected').css('color','blue')
$(':checked').parent().css('color','red')
})
</script>
<form>
<lable>1</lable><input type="text" name="" /><br>
<lable>2</lable><input type="text" name="" /><br>
<lable>3</lable><input type="text" name="" disabled /><br>
<lable>4</lable><input type="text" name="" /><br>
<select name="" id="">
<option value ="">摩羯座</option>
<option selected>双鱼座</option>
<option value ="">射手座</option>
<option value ="">天蝎座</option>
</select>
<br>
爱好
<lable><input type="checkbox" name="" />看书</lable>
<lable><input type="checkbox" name="" checked/>游戏</lable>
<lable><input type="checkbox" name="" />游泳</lable>
</form>
</body>
</html>
批改老师:灭绝师太批改时间:2018-12-17 09:22:00
老师总结:完成的不错,但是基本跟老师一样,需要自己好好掌握,最好集合案例奥!