Home » , , , » [3] Code ป้องกันการ Copy (คัดลอก) ลากเมาส์ กัน การคลิกขวา

[3] Code ป้องกันการ Copy (คัดลอก) ลากเมาส์ กัน การคลิกขวา

Written By just author on วันเสาร์ที่ 16 พฤศจิกายน พ.ศ. 2556 | 03:01


















ข้อความสีแดง ๆ นั้นจะใส่ข้อความอะไรก็ได้แล้วแต่เพื่อน ๆ ต้องการใส่ แนะนำว่าภาษาอังกฤษจะดีกว่า่ สำหรับในส่วนของเว็บบล็อคอย่าง Blogger


<script language=javascript>
<!--
var message="ใส่ข้อความที่ต้องการ";
function clickIE4(){
if (event.button==2){
alert(message);
return false;
}
}
function clickNS4(e){
if (document.layers||document.getElementById&&!document.all){
if (e.which==2||e.which==3){
alert(message);
return false;
}
}
}
if (document.layers){
document.captureEvents(Event.MOUSEDOWN);
document.onmousedown=clickNS4;
}
else if (document.all&&!document.getElementById){
document.onmousedown=clickIE4;
}
document.oncontextmenu=new Function("alert(message);return false")
// -->
</script>
<script language="JavaScript1.2">
//Disable select-text script (IE4 , NS6 )
function disableselect(e){
return false
}
function reEnable(){
return true
}
//if IE4
document.onselectstart=new Function ("return false")
//if NS6
if (window.sidebar){
document.onmousedown=disableselect
document.onclick=reEnable
}
</script>

0 ความคิดเห็น:

แสดงความคิดเห็น