<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>eq()方法-plc学堂</title>
<script type="text/
javascript" src="mytest/jQuery/jquery-1.8.3.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("li").eq(1).css("color","blue")
})
</script>
</head>
<body>
<div>
<ul>
<li>html专区</li>
<li>javascript专区</li>
<li>div+css专区</li>
<li>jquery专区</li>
</ul>
</div>
</body>
</html>
<!doctype html>
<html>
<head>
<meta charset="utf-8"/>
<title>点击
弹出窗口效果-plc学堂</title>
<style type="text/css">
.font{
font-size:18px;
color:yellow
}
.bg{
background:#336;
}
</style>
<script type="text/javascript" src="mytest/jQuery/jquery-1.8.3.js"></script>
<script type="text/javascript">
$(document).ready(function(){
$("li").eq(-1).css("color","blue")
})
</script>
</head>
<body>
<div>
<ul>
<li>html专区</li>
<li>javascript专区</li>
<li>div+css专区</li>
<li>jquery专区</li>
</ul>
</div>
</body>
</html>