在windows上有一个小图标,右健点击图标会执行一个自定义功能,最好有例子代码,谢谢!

解决方案 »

  1.   

    屏幕上有个图片,在图片上,点击右健,能够实现一个简单功能,建设alert("什么");
      

  2.   

    我试着用
    document.oncontextmenu = function() {alert("dddd"); 
    }没反应,
      

  3.   


    document.getElementById("test").onmouseup=function(oEvent) {
        if (!oEvent) oEvent=window.event;
        if (oEvent.button==2) {
            //-- do something for user right click
            // alert("Mouse up");
        }
    }
      

  4.   

    看不懂,document.oncontextmenu = function() {alert("dddd"); 
    }这种方法怎么不行呢