zoukankan      html  css  js  c++  java
  • 2015.11.16JQuery 隐藏,显示按钮.

    <!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>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
    <title>无标题文档</title>
    <script type="application/javascript" src="jquery-1.11.3.min.js"></script>
    
    <script type="application/javascript">
    
    $(document).ready(function(e) {
        //$('#hide').ready(function(){$("p").hide();});
        //$('#hide').click(function(){$("p").hide();});
        //$('#show').click(function(){$('p').show();});
        //$('#show').click(function(){$('div').show();});
    
    });
    
    
    </script>
    </head>
    
    <body>
    
    <p>显示的内容</p>
    
    <p class="wz">显示的内容2</p>
    
    <div class="wz">div显示</div>
    
    
    <input id="show" onclick="$(this).click($('.wz').show())" type="button" value="显示" />
    
    <input id="hide" onclick="$(this).click($('.wz').fadeToggle(2000))" type="button" value="隐藏" />
    
    <input id="hide" onclick="$(this).click($(this).fadeToggle(2000))" type="button" value="隐藏" />
    
    
    
    </body>
    </html>
  • 相关阅读:
    ByteArrayInputStream(字节数组输入流) 示例
    ASP.NET 页面对象模型
    HTML常用标记
    [elementui]上线iconfont乱码
    time与timeEnd测试运行时间
    放大镜效果
    canvas
    [css] 样式列表
    千分符
    centos源失败
  • 原文地址:https://www.cnblogs.com/shadowduke/p/4970455.html
Copyright © 2011-2022 走看看