Fantasy Lights
Ze Owner

Hello earthlings! I'm Sabrina Roslan. I'm ze owner of this blog. Mind your language please? :)

| Home | About | Tutorials | Freebies |

Message me!
P/s : No harsh words and don't send me any advertisement/spam! Thanks.
About this blog
This blog and header made by me,Sabrina Roslan
This blog is best view in Google Chrome.
Tutorial : Disable right click and CTRL+C
Saturday, June 2, 2012 | 8:17 PM | 0 Candy

Heyyo hi semua :3 Harini saya nak buat tuto disable right click and ctrl+c. Sebelum ni saya ada post tuto disable right without alert message,and yes,sama jugak dengan post saya kali ni cuma yang ni dia sekali dengan disable CTRL+C.fahaaamm taaaakk?Maksudnya memang kalau korang tekan ctrl+c untuk copy,dia memang tak boleh paste jugak sebab dia disable.Nak try tak?Lagipun ni untuk mengelakkan korang punya entry post kena copy :3 Kikiki,okayy lets starrt!

1.First,korang add gadget.Pastu korang add HTML.

2.Lepastuuuu,korang copy kat bawaah ini yaaaa ^.^


<script type="text/javascript">
/***********************************************
* Disable Text Selection script- &#169; 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"
}
//Sample usages
//disableSelection(document.body) //Disable text selection on entire body
//disableSelection(document.getElementById("mydiv")) //Disable text selection on element with id="mydiv"
</script>
<script type="text/javascript">
disableSelection(document.body) //disable text selection on entire body of page
</script>


3.Dah copy?Kalau dah,paste kat kotak HTML.And then Preview,kalau okay,SAVE! P/S : Comment ye kalau tak jadi?InsyaAllah saya boleh bantu :D Dan yang ni saya tak tahu boleh untuk semua template ke tak?Cuba try ye?Mungkin jadi ke kan.And bagi pengguna Blogskin/Classic Template saya pun tak tahu jadi ke tak,tapi semestinya korang boleh cuba try kan? Hehe. :D


Older Post | Newer Post