jQuery选择器

原创 2018-12-10 11:29:17 281
摘要:<!DOCTYPE html><html><head> <meta charset="utf-8"> <title> jQuery选择器-层级选择器</title> <script type="text/javascript"src='jquery-3.3.1.js'

<!DOCTYPE html>

<html>

<head>

<meta charset="utf-8">

<title> jQuery选择器-层级选择器</title>

<script type="text/javascript"src='jquery-3.3.1.js'></script>


</head>

<body>

<script type="text/javascript">

$(document).ready(function(){

$('ul>li').css('list-style','none')

$('ul li').css('list-style','none')

$('label+input').css('height','50px')

$(':checked').parent().css('color','red')

})

</script>

<ul>

<li>1</li>

<li>1</li>

<div>

<li>2</li>

</div>

<li>1</li>

<li>1</li>

<li>1</li>

<li>1</li>

<li>1</li>

</ul>

<form>

<label>姓名</label>

<input type="" name="">

<button>确认</button>

</form>

<br>

<br>


爱好:

<label><input type="checkbox" name="">看书</label>

<label><input type="checkbox" name="">画画</label>

<label><input type="checkbox" name="">游戏</label>

</form>

</body>

</html>


批改老师:韦小宝批改时间:2018-12-10 11:33:10
老师总结:写的还算可以!课后记得要多多练习才可以哦!继续加油吧!

发布手记

热门词条