<!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>jquery show hide方法_www.jb200.com</title>
    <style type="text/css">
        *{font-size:12px;}
        div{width:600px;margin:auto;}          
        #control{background-color:gold;padding:10px;}
    </style>
    <script src="../js/jquery-1.5.1.min.js" type="text/
javascript"></script>
    <script type="text/javascript">
        $(function () {
            $("#btndisplay").click(function () {
                $("#message").show(3000);
            });
            $("#btnhide").click(function () {
                $("#message").hide(3000);
            });
        });
    </script>
</head>
<body>
    <div id="control">
        <input id="btndisplay" type="button" value="显示div" />
        <input id="btnhide" type="button" value="隐藏div" />
    </div>
    <div id="message">
        mouseover、mouseenter的区别:div里套div。见备注。和事件冒泡有关系。<br /> 
        不论鼠标指针穿过被选元素或其子元素,都会触发 mouseover 事件 <br />
        只有在鼠标指针穿过被选元素时,才会触发 mouseenter 事件(穿过子元素不会触发)
    </div>
</body>
</html>