/right-jquery-event-left-click-the-event-to-determine.html
jQuery屏蔽鼠标右键:
$(document).ready(function(){$(document).bind("contextmenu",function(e){return false;});});
JS屏蔽鼠标右键:
<script language="JavaScript">document.οncοntextmenu=new Function("event.returnValue=false;");document.onselectstart=new Function("event.returnValue=false;");</script>
jquery禁止右键弹出的突破方法:
$(document).bind("contextmenu", function() { return false; }); //这段JS代码将禁止右键弹出</pre><!--more--><pre>突破方法:地址栏中输入:javascript:alert($(document).unbind("contextmenu",""));
jquery 鼠标右键事件、左键单击事件判定:
$(function(){$('a').mousedown(function(e){alert(e.which) // 1 = 鼠标左键 left; 2 = 鼠标中键; 3 = 鼠标右键return false;//阻止链接跳转})})如$('#downwps').mousedown(function(e){if(3 == e.which){alert('这 是右键单击事件');}else if(1 == e.which){alert('这 是左键单击事件');}})
jquery 鼠标右键事件、左键单击事件判定
$(function(){ $('a').mousedown(function(e){ alert(e.which) // 1 = 鼠标左键 left; 2 = 鼠标中键; 3 = 鼠标右键 return false;//阻止链接跳转 }) }) 如 $('#downwps').mousedown(function(e){ if(3 == e.which){ alert('这 是右键单击事件'); }else if(1 == e.which){ alert('这 是左键单击事件'); } })
用js,jQuery屏蔽鼠标右与jquery 鼠标右键事件、左键单击事件判定
-
△jQuery屏蔽鼠标右键:
△JS屏蔽鼠标右键:
△jquery禁止右键弹出的突破方法:
如:
△jquery 鼠标右键事件、左键单击事件判定:
-
-