JqueryDOM操作-jquery查找属性节点

来源:互联网 发布:淘宝雪梨家衣服质量 编辑:程序博客网 时间:2024/04/29 05:37
 

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Jquery_demo</title>
</head>
<script src="jquery/jquery-1.3.1.js" type="text/javascript">
</script>
<style type="text/css">
.i{
font-size:24px;
font-weight:800;
color:red;
background-color:blue;
width:250px;
height:250px;
}
.j{
font-size:24px;
font-weight:800;
color:pink;
background-color:red;
width:250px;
height:250px;
}
</style>
<script type="text/javascript">
$(function(){
$("ul li:eq(1)").mouseover(function(){
   $("ul li:eq(1)").addClass("i")
  });
$("ul li:eq(1)").mouseout(function(){
   $("ul li:eq(1)").addClass("j")
  });  
  
});


</script>
<body>
<ul>
<li title='邯郸清华万博'>邯郸清华万博</li>
<li title='邯郸北大青鸟'>邯郸北大青鸟</li>
<li title='邯郸领创教育'>邯郸领创教育</li>
</ul>
</body>
</html>

原创粉丝点击