zoukankan      html  css  js  c++  java
  • button轮番点击,只点击一次,鼠标hover

    <!DOCTYPE html>
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
        <title></title>
        <script src="scripts/jquery-1.7.1.js"></script>
        <script>
            $(function () {
                ////合成指向、移开事件
                //$('#btnShow').hover(function () {//指向
                //    this.style.color = 'red';
                //}, function () {//移开
                //    this.style.color = 'black';
                //});


                //合成点击事件, 指定在n个函数间切换,点击次数为m
                //$('#btnShow').toggle(function () {//第m%n==1次点击时执行此函数
                //    alert(1);
                //}, function () {//第m%n==2次点击执行此函数
                //    alert(2);
                //}, function () {//第m%n==0次点击执行此函数
                //    alert(3);
                //});

                //合成事件:只将绑定的事件执行一次
                $('#btnShow').one('click', function () {
                    alert(1);
                });
            })
        </script>
    </head>
    <body>
        <input id="btnShow" type="button" value="显示" />
    </body>
    </html>

  • 相关阅读:
    oracle数据库基础知识汇总—30天(一)
    SQL server
    mySQL 黑窗口运行命令
    MySQL
    常用网址
    常见浏览器JS引擎和内核
    nodejs
    audio标签自动播放在安卓播放正常,IOS不能自动播放
    Microsoft.Office.Interop.Excel Find 操作
    python 的os.getenv("PATH")和os.environ.get("PATH")的区别
  • 原文地址:https://www.cnblogs.com/wyt007/p/6047437.html
Copyright © 2011-2022 走看看