zoukankan      html  css  js  c++  java
  • jquery处理鼠标左中右键事件

    <!DOCTYPE html>
    <html lang="en">
    <head>
        <meta charset="UTF-8">
        <title>智能社——http://www.zhinengshe.com</title>
        <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0">
        <meta name="apple-mobile-web-app-capable" content="yes">
        <meta name="apple-mobile-web-app-status-bar-style" content="black">
    
    
    </head>
    <body>
        <input type="button" value="按钮" id="test">
        <script type="text/javascript" src="js/jquery.min.js"></script>
        <script>
            $("#test").mousedown(function(e){
                if(e.which==1){
                    alert("这是 左 键单击事件");
                }else if(e.which==2){ 
                    alert("这是 中 键单击事件");
                }else if(e.which==3){
                    alert("这是 右 键单击事件");
                }
            }) 
        </script>
    </body>
    </html>
  • 相关阅读:
    shell:bash基本特性
    python_day02
    python_day01
    centos环境下安装python3以及pip3
    http1到http3的巨大变化
    HTTP协议
    bootstrap
    JQuery
    BOM与DOM
    23种设计模式的几种常见的设计模式
  • 原文地址:https://www.cnblogs.com/theWayToAce/p/7237945.html
Copyright © 2011-2022 走看看