jQuery教程2---隐藏p标签内容-按钮

<head>
    <title>jQuery教程2---隐藏p标签内容</title>

    <script src="js/jQuery.js" type="text/javascript"></script>

    <script type="text/javascript">
$(document).ready(function(){
$("button").click(function(){
$("p").hide();
});
});
    </script>

</head>
<body>
    <h2>
        This is a heading</h2>
    <p>
        This is a paragraph.</p>
    <p>
        This is another paragraph.</p>
    <button type="button">         Click me</button>
</body>

posted @ 2013-04-21 20:56  侯伟东  阅读(712)  评论(0编辑  收藏  举报