發新話題

超強鎖右鍵語法

超強鎖右鍵語法

平常鎖右鍵 大家都可以按 Ctrl + C 複製 Ctrl + V 貼上
但是這個語法可以讓你連文字都無法反白起來~


請將下列語法 "取代" <body>
<body ONDRAGSTART="window.event.returnValue=false" onSelectStart="event.returnValue=false" ONCONTEXTMENU="window.event.returnValue=false" >

=================================
鎖滑鼠右鍵及防highlight

<body onselectstart="return false;" ondragstart="return false;" oncontextmenu="return false;">

======================

右鍵只鎖圖片

<SCRIPT Language="JavaScript">
var clickmessage="圖片請自找 謝謝您"
function disableclick(e) {if (document.all) {if (event.button==2||event.button==3) {if (event.srcElement.tagName=="IMG"){alert(clickmessage);
return false;}}}if (document.layers) {if (e.which == 3) {alert(clickmessage);return false;}}}function associateimages(){for(i=0;i<document.images.length;i++)document.images.onmousedown=disableclick;}if (document.all)document.onmousedown=disableclick
else if (document.layers)associateimages()</SCRIPT>

======================
鎖右鍵(無對話方塊跑出來)

<body oncontextmenu="window.event.returnValue=false">

======================
鎖右鍵(有對話方塊跑出)

<script language="JavaScript"><!--
if (navigator.appName.indexOf("Internet Explorer") != -1)
document.onmousedown = noSourceExplorer;
function noSourceExplorer(){if (event.button == 2 | event.button == 3)
{
alert("偷複製是不對的唷!!");}}
// -->
</script>

======================
終於...研發出了至少普通人破不了的語法...只要加上防左鍵(不能反白)防右鍵而且還是無工具列視窗的語法就太完美了.因為這個語法是讓你連Ctrl+C都不能使用的喔.快試試看吧

<SCRIPT language=JavaScript>
<!-- begin
document.onmousedown=click;
document.onkeydown=click;
if (document.layers) window.captureEvents(Event.MOUSEDOWN); window.onmousedown=click;
if (document.layers) window.captureEvents(Event.KEYDOWN); window.onkeydown=click;
function click(e){
if (navigator.appName == 'Netscape'){
if (e.which != 1){
alert("是不是連鍵盤都無法使用啦?");
return false;}}
if (navigator.appName == "Microsoft Internet Explorer"){
if (event.button != 1){
alert("是不是連鍵盤都無法使用啦?");
return false;}}}
// end -->
</SCRIPT>

TOP

發新話題

本站所有圖文均屬網友發表,僅代表作者的觀點與本站無關,如有侵權請通知版主會盡快刪除。