日期:2014-05-17 浏览次数:20859 次
<!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>
    <title></title>
    <script src="http://ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js"></script>
</head>
<body>
<ul id="ul001">
  <li id="li001">000</li>
  <li id="li002">000</li>
  <li id="li003">000</li>
</ul>
<div id="001" style=' background:red;width:50px; height:50px; display:none;'></div>
<div id="002" style=' background:blue;width:50px; height:50px;display:none;'></div>
<div id="003" style=' background:yellow;width:50px; height:50px;display:none;'></div>
<script type="text/javascript">
    $(document).ready(function () {
        $("#li001").click(function () {
            $("#001").show();
            $("#002").hide();
            $("#003").hide();
        });
        $("#li002").click(function () {
            $("#002").show();
            $("#001").hide();
            $("#003").hide();
        });
        $("#li003").click(function () {
            $("#003").show();
            $("#002").hide();
            $("#001").hide();
        });
    })
    
</script>
</body>
</html>