Programalama > JAVA SCRIPT

Etiketler: sag, tus, kilidi......

Ort. 0
Puan ver:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
<SCRIPT language=JavaScript1.2>
 
/*
 
No Right Click
 
   by: Mondain
 
 
*/
 
 
 
if (window.Event) // Only Netscape will have the CAPITAL E.
 
  document.captureEvents(Event.MOUSEUP); // catch the mouse up event
 
 
 
function nocontextmenu()  // this function only applies to IE4, ignored otherwise.
 
{
 
    event.cancelBubble = true
 
    event.returnValue = false;
 
 
 
    return false;
 
}
 
 
 
function norightclick(e)    // This function is used by all others
 
{
 
    if (window.Event)   // again, IE or NAV?
 
    {
 
        if (e.which == 2 || e.which == 3)
 
            return false;
 
    }
 
    else
 
        if (event.button == 2 || event.button == 3)
 
        {
 
            event.cancelBubble = true
 
            event.returnValue = false;
 
            return false;
 
        }
 
     
 
}
 
 
 
document.oncontextmenu = nocontextmenu;     // for IE5+
 
document.onmousedown = norightclick;        // for all others
 
</SCRIPT>


Yorumlar                 Yorum Yaz
Bu hazır kod'a ilk yorumu siz yapın!
KATEGORİLER
ASP - 240
ASP.NET - 24
C# - 75
C++ - 174
CGI - 8
DELPHI - 247
FLASH - 49
HTML - 536
PASCAL - 246
PERL - 11
PHP - 160
WML - 9
XML - 2
Copyright © 2002 - 2025 Hazır Kod - Tüm Hakları Saklıdır.
Siteden yararlanırken gizlilik ilkelerini okumanızı tavsiye ederiz.
hazirkod.com bir İSOBİL projesidir.