码迷,mamicode.com
首页 > Web开发 > 详细

HTML 练习显示隐藏

时间:2019-03-19 16:39:33      阅读:137      评论:0      收藏:0      [点我收藏+]

标签:play   splay   UNC   isp   har   show   click   value   meta   

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="jquery-3.3.1.min.js"></script>
</head>
<body>
<p style="display:none">hello world</p>
<input type="button" id="show" value="显示">
<input type="button" id="hide" value="隐藏">
<input type="button" id="toggle" value="toggle">
</body>
<script>
    $("#show").click(function(){
        $("p").show()
    })
    $("#hide").click(function(){
        $("p").hide()
    })
    $("#toggle").click(function(){
        $("p").toggle()
    })

</script>
</html>

HTML 练习显示隐藏

标签:play   splay   UNC   isp   har   show   click   value   meta   

原文地址:https://www.cnblogs.com/klvchen/p/10559177.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!