ป้องกันคนคลิกขวา และ ป้องกันคน select ข้อความ
เขียนเมื่อ 14 ปีก่อน โดย Ninenik Narkdeeselect ข้อความ right click
คำสั่ง การ กำหนด รูปแบบ ตัวอย่าง เทคนิค ลูกเล่น การประยุกต์ การใช้งาน เกี่ยวกับ select ข้อความ right click
ไปที่
Copy
แทรกโค๊ดนี้ในส่วนของแท็ก <head>
<!--ป้องกันคนคลิกขวา--> <script type="text/javascript"> var message=""; function clickIE(){ if(document.all){ (message); return false; } } function clickNS(e){ if (document.layers || (document.getElementById && !document.all)){ if (e.which==2||e.which==3){ (message); return false; } } } if(document.layers){ document.captureEvents(Event.MOUSEDOWN); document.onmousedown=clickNS; }else{ document.onmouseup=clickNS; document.oncontextmenu=clickIE; } document.oncontextmenu=new Function("return false"); </script>
<!--ป้องกันคน select ข้อความ--> <script type="text/javascript"> function disableselect(e){ if (window.sidebar){ var objName=e.target.nodeName; if(objName!="INPUT" && objName!="TEXTAREA"){ return false } }else{ return false } } function reEnable(){ return true } document.onselectstart=new Function ("return false") if (window.sidebar){ document.onmousedown=disableselect document.onclick=reEnable } </script>
กด Like หรือ Share เป็นกำลังใจ ให้มีบทความใหม่ๆ เรื่อยๆ น่ะครับ

URL สำหรับอ้างอิง
Top
Copy
ขอบคุณทุกการสนับสนุน
![]()