日期:2014-05-16 浏览次数:20322 次
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<title> New Document </title>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
<script type="text/javascript" src="jQuery-1.7.1.min.js"></script>
<script type="text/javascript">
$(function(){
$(".list li").each(function(index){
$(this).click(function(){
$(".content .show").removeClass("show");
$(".content .di").eq(index).addClass("show");
});
});
})
</script>
</head>
<body>
<div id="container">
<div name="content" id="content">
<div class="list">
<ul>
<li>随你吃</li>
<li>任你喝</li>
<li>让你玩</li>
<li>尽情乐</li>
</ul>
</div>
<div class="content">
<div class="di show"><h1>随你吃</h1></div>
<div class="di"><h1>任你喝</h1></div>
<div class="di"><h1>让你玩</h1></div>
<div class="di"><h1>尽情乐</h1></div>
</div>
</div>
</div>
</body>
</html>