abstrakt:<!DOCTYPE html><html><head><meta charset="utf-8"> <title>jQuery選擇器</title> <script type="text/javascript"src="jquery-3.3.1.min.js"&
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>jQuery選擇器</title>
<script type="text/javascript"src="jquery-3.3.1.min.js"></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>
輸入框1<input type="text" name=""><br>
輸入框2<input type="text" name=""><br>
輸入框3<input type="text" name="" disabled><br>
輸入框4<input type="text" name=""><br>
<select>
<option>摩羯座</option>
<option selected>雙魚座</option>
<option>射手座</option>
<option>天蝎座</option>
</select>
<br>
愛好:
<label><input type="checkbox" name="">看書</label>
<label><input type="checkbox" name="" checked>游泳</label>
<label><input type="checkbox" name="">游戲</label>
</form>
</body>
</html>
Korrigierender Lehrer:天蓬老師Korrekturzeit:2019-05-15 13:20:59
Zusammenfassung des Lehrers:表單選擇與操作, 不論是在jquery中, 還是在其它腳本 中, 都是一個重點和難點