برگزیده های پرشین تولز

جلوگيري از right click

knowhow

مدیران قدیمی
تاریخ عضویت
25 دسامبر 2002
نوشته‌ها
3,478
لایک‌ها
22
اينو تا hot scripts پیدا کردم و تست هم نکردم ولی خودش نوشته
This script will block BOTH I.E. and Netscape visitors from right clicking on your webpage and will pop up an alert box with a message that you choose. This script also has the option to close the window after the message. This script was tested in I.E. 6.0, Netscape 7.0

http://www.hotscripts.com/cgi-bin/dload.cgi?ID=27461
 

ehsan

Administrator
مدیر انجمن
Administrator
تاریخ عضویت
5 دسامبر 2002
نوشته‌ها
7,949
لایک‌ها
3,918
محل سکونت
Internet
از اين كد ساده هم ميتوني استفاده كني:
HTML:
<script language="javascript" type="text/javascript">
<!--
  
  function right(e) {
    if (navigator.appName == 'Netscape' && (e.which == 2 || e.which == 3)) {
      alert(" هر پيام اخطار دهنده ");
      return false;
    }
    else if (navigator.appName == 'Microsoft Internet Explorer' && (event.button==2 || event.button == 3)) {
      alert(" هر پيام اخطار دهنده ");
      return false;
    }
    return true;
  }
  document.onmousedown=right;
  if (document.layers) window.captureEvents(Event.MOUSEDOWN);
  window.onmousedown=right;
// -->
</script>
 
بالا