ป้องกันคนคลิกขวา และ ป้องกันคน select ข้อความ
25 September 2008แทรกโค๊ดนี้ในส่วนของแท็ก <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>
บทความคนเข้าอ่านวันนี้
26 Feb 09 การกำหนดให้ input text เลื่อนโฟกัส focus เองอัตโนมัติ ด้วย jQuery อ่าน 6188 03 Jun 09 สร้างระบบ slide เลื่อนซ้าย ขวา ด้วย jquery อย่างง่าย อ่าน 14664 26 Dec 10 แนะนำ PHP Simple HTML DOM Parser สำหรับ ดึงข้อมูล เฉพาะส่วนที่ต้องการ อ่าน 3910 25 Sep 08 การกำหนด selectors ด้วย jQuery แบบตัวกรองพื้นฐาน อ่าน 2955 25 Sep 08 ไม่ให้ทำการ คัดลอก ( Copy ) และ วาง ( Paste ) อ่าน 2775 13 Feb 09 แปลงข้อความเป็นตัวเล็ก toLowerCase ตัวใหญ่ toUpperCase ด้วย javascript อ่าน 2210 17 Nov 08 ตรวจสอบฟอร์ม form ก่อน submit ด้วย jquery อ่าน 10494 16 Aug 09 เริ่มต้น jQuery UI กับการสร้าง ปฏิทินเลือกวันที่ datepicker อ่าน 21097 02 Nov 10 แนะนำ และการใช้งาน jQuery Colorpicker Plugin การเลือกค่าสี อ่าน 1949 28 Oct 10 เริ่มต้นใช้งาน jquery ui autocomplete อย่างง่าย อ่าน 5498 25 Sep 08 ใช้ PHP สร้าง Javascript อย่างง่าย อ่าน 4725 25 Sep 08 ป้องกันคนคลิกขวา และ ป้องกันคน select ข้อความ อ่าน 2154 24 Feb 09 สร้างรูปแบบข้อความ เบอร์โทร เลขที่บัตรประชาชน เวลา ด้วย javascript อ่าน 5324 07 Sep 10 ใช้ ckeditor กับ filemanager ด้วย php รองรับ ฟังก์ชัน javascript อ่าน 4036 19 Jul 10 การนำ ระบบสมาชิก ของ facebook มาประยุกต์ใช้ อ่าน 6735 12 Nov 08 กำหนด permission ไฟล์หรือโฟลเดอร์ด้วยฟังก์ชัน FTP ใน PHP อ่าน 2137 30 Oct 10 การเลื่อน jQuery UI tab อัตโนมัติ ตามเวลาที่กำหนด อ่าน 11026 19 Jun 10 สร้าง comment ด้วย social plugins ใน facebook api อย่างง่ายดาย อ่าน 20166 17 Oct 08 แสดงตัวอย่างรูป ก่อน upload image preview berfore upload อ่าน 10654 12 May 10 แนวทาง การดึงข้อมูล แบบ real time ด้วย ajax ใน jQuery อ่าน 10982
