Blogger Information
Blog 21
fans 0
comment 0
visits 12344
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
0402————document执行方式.12时03分
许增颜
Original
466 people have browsed it

代码如下:

实例

<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>0402作业</title>
	<style type="text/css">
		.love{
			list-style-type: none;
			padding: 20px;
			color: gray;
		}
	</style>
	<!-- JQuery两种引入方式 -->
		<!-- 1.本地引入 -->
		<!-- <script type="text/javascript" src="jquery.js"></script> -->
		<!-- 2.线上引入 -->
		<script type="text/javascript" src="http://apps.bdimg.com/libs/jquery/2.1.4/jquery.min.js"></script>
		<script type="text/javascript">
			// 1.window onload方式
			// window.onload = function(){
			// 	$('#ye > li ').addClass('love')
			// }
			// 2.document方式
			// $('document').ready(function(){
			// 	$('#ye > li ').addClass('love')
			// })
			// docement简写方式
			$(function(){
				$('#ye > li ').addClass('love')
			})
		</script>

</head>
<body>
	<ul id="ye">
		<h2>某公司人事部统计</h2>
		<li>传媒部
			<ul>
				<li>李振</li>
				<li>李逵</li>
				<li>徐欢</li>
			</ul></li>
		<li>科技部
		<ul>
				<li>许正达</li>
				<li>莫海澜</li>
				<li>龙楚怡</li>
			</ul></li>
		<li>营销部
		<ul>
				<li>孙欣</li>
				<li>黄威</li>
				<li>杨正铭</li>
			</ul></li>
	</ul>
</body>
</html>

运行实例 »

点击 "运行实例" 按钮查看在线实例

效果图:

5TZTFX`GB`VARAUQMC]XWLJ.png

Correction status:Uncorrected

Teacher's comments:
Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post