zoukankan      html  css  js  c++  java
  • 鼠标连续点击事件--toggle()学习例子

    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>鼠标连续点击事件--toggle()</title>
    <script type="text/javascript" src="js/jquery-1.8.3.min.js"></script>
    <script type="text/javascript">
    $(function() {
    $("div")
    .css("width", "100px")
    .css("height", "100px")
    .css("background-color", "cornflowerblue")
    .toggle( //可以绑定多个点击事件,多个事件之间循环调用
    function() {
    $("div").html("<h1>你好</h1>");//第一次点击时触发
    },
    function() {
    $("div").html("<h2>你好</h2>");//第2次点击时触发
    },
    function() {
    $("div").html("<h3>你好</h3>");//第3次点击时触发
    },
    function() {
    $("div").html("<h4>你好</h4>");//第4次点击时触发
    },
    function() {
    $("div").html("<h5>你好</h5>");//第5次点击时触发
    },
    function() {
    $("div").html("<h6>你好</h6>");//第6次点击时触发
    }
    );
    });
    </script>
    </head>
    <body>
    <div></div>
    </body>

  • 相关阅读:
    梅森素数
    高精度乘法
    快速幂取模
    高精度加法
    Linux 压缩&解压缩
    Lec_Cloud资源云平台
    IP102,IP102-K_V3.0 输入节点机
    A7互动主机
    音频处理器的使用
    关于测试随笔
  • 原文地址:https://www.cnblogs.com/tian-xin/p/8204015.html
Copyright © 2011-2022 走看看