Javascript ห้ามคลิกขวา
Support Firefox และ IE จะว่าไปก็ไม่ได้ทำให้ชีวิตดีขึ้นหรอกไอ้ Script พวกนี้ แต่ถ้าลูกค้าขอก็ต้องจัดให้…
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 |
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") |
ที่มา : http://www.java-scripts.net/javascripts/Right-Click-Block.phtml