jqery表单选择器

Original 2019-05-13 15:50:35 140
abstract:<!DOCTYPE html><html lang="en"><head><meta charset="UTF-8"><meta name="viewport" content="width=device-width, initial-scale=1.0">&

<!DOCTYPE html>

<html lang="en">

<head>

<meta charset="UTF-8">

<meta name="viewport" content="width=device-width, initial-scale=1.0">

<meta http-equiv="X-UA-Compatible" content="ie=edge">

<title>表单选择</title>

</head>

<body style="background:pink">

<form >

<input type="text" name="" >22<br>

<input type="text" name="" >33<br>

<input type="text" name="" disabled="disabled">44<br>

<select name="" id="">

<option value="">1</option>

<option value="" selected>2</option>

<option value="">3</option>

<option value="">4</option>

</select>

<input type="checkbox" class="checkbox">11111

<input type="checkbox" class="checkbox" checked>22222

<input type="checkbox" class="checkbox">333


</form>

<script>

$(document).ready(function(){

//     $(':enabled').parent().css('color','red');

//     $(':disabled').parent().css('color','pink')

//     $(':selected').parent().css('color','gray')

//     $(':checked').parent().css('color','pink')

$(':enabled').css('background','red')


})



</script>

</body>

</html>


Correcting teacher:查无此人Correction time:2019-05-14 09:14:50
Teacher's summary:完成的不错。jq比js简单很多,练好jq,可以减少很多工作量。继续加油

Release Notes

Popular Entries