语法:$(selector).toggle(speed,callback,switch)

实例:

 <script src="js/jquery.min.js"></script>
    <script type="text/javascript">
        $(function () {
            $("input").click(function () {
                $("img").toggle(1000);//逐渐隐藏
            }
            );
        });
    </script>

<body>

  <input type="button" value="HideOrShow" />

   <p> <img  src="images/1.jpg"/></p>

</body>

相关文章:

  • 2022-12-23
  • 2021-10-09
  • 2021-09-27
  • 2021-07-26
  • 2021-12-13
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-02-18
  • 2022-12-23
  • 2021-10-24
  • 2022-12-23
  • 2021-10-16
  • 2022-12-23
相关资源
相似解决方案