salam
shap nk kongsi sal cara disable right click..hehe
ade tiga jenis tau...
nk tau ap..jom tgk ni,,
1.copy + no right click
1.Pergi dashboard>design>edit HTML
2.Korang cari code
<body>
3.Korang tukarkan code kat atas tadi dengan kod ni
<body oncontextmenu="return false;">
4.Savekan.
2.copy + no right click + pop up window
1.Pergi dashboard>design>add gadget>HTML/javascript
2.Pastekan code kat bawah ni dalam kotak HTML/javascript
<script language='JavaScript'>
<!--
//Disable right mouse click Script
//By Maximus (maximus@nsimail.com) w/ mods by DynamicDrive
//For full source code, visit http://www.dynamicdrive.com
var message="No Right-Click!";
///////////////////////////////////
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>
3.Text yang aku highlightkan tu boleh ditukar mengikut sesedap rasa korang yek.Contoh macam kat blog aku ni."No Right Click Please!!!?"
4.Savekan.
3.no copy + no highlight (ak rase ni x berguna kot..haha)
1.Pergi ke dashboard>design>edit HTML
2.Cari code
<head>
3.Pastekan code kat bawah ni selepas code diatas
<script type="text/javascript">
//form tags to omit in NS6+:
//http://eking.in
var omitformtags=["input", "textarea", "select"]
omitformtags=omitformtags.join("|")
function disableselect(e){
if (omitformtags.indexOf(e.target.tagName.toLowerCase())==-1)
return false
}
function reEnable(){
return true
}
if (typeof document.onselectstart!="undefined")
document.onselectstart=new Function ("return false")
else{
document.onmousedown=disableselect
document.onmouseup=reEnable
}
</script>
4.Savekan.
ok siap...
semoga berjaya..
daaaa.....
0 Komen:
Post a Comment
Komen jer...Jangan Malu..Heee