<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>无标题页</title>
<script src="jquery-1.10.2.js" type="text/javascript"></script>
<script type="text/javascript">
//链式编程
$(function(){
$('div').click(function(){
$(this).css("background","red").siblings("div").css("background","white");
});
});
</script>
</head>
<body>
<input type="button" id="btn"/>
<div class="warning">警告1!</div>
<div class="warning">警告2!</div>
<p>P1</p>
<p>P2</p>
<div class="warning">警告3!</div>
<div class="warning">警告4!</div>
</body>
</html>
Jquery系列-Jquery链式编程
最新推荐文章于 2024-04-06 22:50:04 发布