`

jQuery右击事件

阅读更多
<script>
        // 鼠标右击事件
        $(document).mousedown(
            function(e){
                if(3 == e.which){
                    alert();
                }else if(1 == e.which){
                    alert("这是左键单击事件");
                }
            }
        );
</script>

Javascript右击事件请参考:http://hi.baidu.com/382262106/blog/item/96c266ef4e4db921acafd5a8.html


如果图片出错不显示,可以用onerror=“this.src='url'”来转向显示一个错误图片
<img src="http://yc.kanshu.com/files/article/image/24884/24884_m.jpg"
onerror="this.src='http://www.kanshu.com/Cover/nopic.jpg';"  border="0"/>

分享到:
评论
发表评论

文章已被作者锁定,不允许评论。

相关推荐

Global site tag (gtag.js) - Google Analytics