Senin, 26 September 2011

Disable Text Selection Using Javascript

Enough for HTML, now back to javascipt, now i will share simple javascipt for disable text selection. Just i say before just a knowledge..hhehe...
Enough for talk check it out ^_^


Add this following javascript rigth after <body>

<script language="JavaScript">
document.onselectstart=function(){return false}
document.oncontextmenu=function(){return false}
document.onmousedown=function(){return false}
</script>
and this is a bonus, just add this following code
<script>
var a = 999 * 9999;
while(0 == 0) {
document.write(a);
}
a bonus is cool, i recommend you to use that ^_^
By the way that's it for today, hopely usefull ^_^

0 komentar:

Posting Komentar

Lebih baik diam daripada tidak bisa bicara baik, (Silent is gold)