bm2s โพสต์ 2010-3-29 10:41:59

วิธิป้องกันการ Copy ข้อมูลในบอร์ดเบื้องต้นครับ

แก้ไขล่าสุดโดย bm2s เมื่อ 2010-3-29 15:23

แก้ไขล่าสุดโดย bm2s เมื่อ 2010-3-29 15:06

แก้ไขล่าสุดโดย bm2s เมื่อ 2010-3-29 15:05

JavaScript นี้เหมาะสำหรับเจ้่าของเว็บที่ป้องกันCopyรูปภาพนะครับ
ทำให้ไม่เปลืองทรัพยากรของเว็บครับ


เปิดไฟล์ header.html สกินที่คุณใช้
ค้นหาคำว่า
</head>

แล้วใส่ด่านล่างครับ



ปล. โค๊ตนี้ ห้ามคลิกขวา ห้ามคุมดำ ห้ามกด CTRL + A,C,S,X
ใช้ได้กับ IE และ Firefox นะครับ บราวเซอร์อื่น ๆ ยังไม่ได้ลองครับ

**ใครมีโค๊ตที่ให้ดูโค๊ตของเว็บไม้ได้ ช่วยนำมาแจกด้วยนะครับ<script language=JavaScript>
var message="You may not right mouse click this page.";

///////////////////////////////////
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 type='text/javascript'>
/***********************************************
* Disable Text Selection script- ? Dynamic Drive DHTML code library (www.dynamicdrive.com)
* This notice MUST stay intact for legal use
* Visit Dynamic Drive at http://www.dynamicdrive.com/ for full source code
***********************************************/

function disableSelection(target){
   if(typeof target.onselectstart != 'undefined')   //IE route
      target.onselectstart=function(){ return false; }
   else if(typeof target.style.MozUserSelect != 'undefined')    //Firefox route
      target.style.MozUserSelect = 'none'
   else    //All other route (ie: Opera)
      target.onmousedown = function(){ return false; }
   target.style.cursor = 'default';
}

/* Disable Right Click */
var message="You may not right mouse click this page.";
if (navigator.appName == 'Microsoft Internet Explorer'){
function NOclickIE(e) {
if (event.button == 2 || event.button == 3) {
alert(message);
return false;
}
return true;
}
document.onmousedown=NOclickIE;
document.onmouseup=NOclickIE;
window.onmousedown=NOclickIE;
window.onmouseup=NOclickIE;
}
else {
function NOclickNN(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=NOclickNN; }
document.oncontextmenu=new Function("alert(message);return false")
}

function disableCtrlKeyCombination(e){
//list all CTRL + key combinations you want to disable
var forbiddenKeys = new Array('a', 'c', 's', 'u', 'x');
var key;
var isCtrl;

if(window.event){
   key = window.event.keyCode;   //IE
   if(window.event.ctrlKey) isCtrl = true;
   else isCtrl = false;
}
else{
   key = e.which;   //firefox
   if(e.ctrlKey) isCtrl = true;
   else isCtrl = false;
}

//if ctrl is pressed check if other key is in forbidenKeys array
if(isCtrl){
   for(i=0; i<forbiddenKeys .length; i++){
      //case-insensitive comparation
      if(forbiddenKeys.toLowerCase() == String.fromCharCode(key).toLowerCase()){
         alert('Key combination CTRL + '+String.fromCharCode(key)+' has been disabled.');
         return false;
      }
   }
}
return true;
}</script>
<script type="text/javascript" src="/a/script/textsizer.js">
/***********************************************
* Document Text Sizer- Copyright 2003 - Taewook Kang.All rights reserved.
* Coded by: Taewook Kang (http://www.txkang.com)
* This notice must stay intact for use
* Visit http://www.dynamicdrive.com/ for full source code
***********************************************/
</script>

<body style="font-family:tahoma;margin-top:0px;margin-left:0px;" background="/a/writer/pic/bg_writer2.gif" onKeyPress="return disableCtrlKeyCombination(event);" onKeyDown="return disableCtrlKeyCombination(event);">


<script language="JavaScript1.2">
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>
</html>

prsp โพสต์ 2010-4-6 10:13:01

ขอบคุณนะครับ

bunnachart โพสต์ 2010-4-6 14:06:40

ขอบคุณมากครับ

dekza0007 โพสต์ 2010-4-8 01:33:51

ขอบคุณครับ

3cha โพสต์ 2010-4-8 02:39:56

ขอบคุณมากครับ

039767494 โพสต์ 2010-4-8 09:01:07

ใจค๊าฟช่วยป้องกันพวกที่ชอบดูดแล้วไม่ให้เครดิตด้วย

matatomi โพสต์ 2010-4-10 14:06:31

น่าสนใจมากครับ

jaideejung007 โพสต์ 2010-4-17 13:51:55

แก้ไขล่าสุดโดย jaideejung007 เมื่อ 2010-4-17 13:54

เฮ้ย อย่างนี้ต้องลองแล้ว

เก็บๆๆๆๆๆ

แต่ถ้าปิดจาวาสคริปต์ของเบราวเซอร์

อันนี้ก็จบเฮเหมือนกัน

แต่ก็ดี ป้องกันได้ในระดับหนึ่ง

bm2s โพสต์ 2010-4-17 15:51:18

ตอบกลับ 8# jaideejung007


    อย่าเพิ่งเอาไปลองนะครับ

โค๊ตคุมดำมันทำให้พิมพ์ข้อความไม่ได้

กำลังแก้ไขอยู่ครับ

jaideejung007 โพสต์ 2010-4-17 16:34:06

ใช่ครับรีบน

หากใช้ใน FF มันจะพิมพ์ไม่ได้

แต่ถ้าใช้ใน IE ไม่มีปัญหาครับ

ส่วนมาก จาวาสคริปต์ มันจะรองรับกับ iE มากกว่าบราวเซอร์รุ่นและยี่ห้ออื่นๆ นะ
หน้า: [1] 2
ดูในรูปแบบกติ: วิธิป้องกันการ Copy ข้อมูลในบอร์ดเบื้องต้นครับ