cara-cara nak matikan fungsi click serta hightlight mouse.

 heyy u all, ,rinie aerol nk tunjuk satu trick. .huhu u all mesti da tahukan ..urmmm mcm tajuk posting tuh. .huhu sebelum2 ni rasa nya aerol pernah buat tutorial tentang disable click bukan ..hurmm hari special ckit..coz dengan code html ni blog u all terpelihara dari copy.. .sebbnya copy boleh digunakan dengan pelbagai cara,ada yang menggunakan mouse(noob user),ada yang menggunakan kekunci keyboard dengan menghilight perkataan lalu menekan ctrl+c. ..hari ni aerol nak ajar satu trick disable hightlight and copy...oke ikut step3 nye..

1.pergi ke design/add a gadget/pilih htlm javascript..

2.salin code bawah ni


<script type="text/javascript">
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.paste di html javascript tadi.. then save :D..

0 ulasan:

Artikel menarik

Related Posts Plugin for WordPress, Blogger...

lik lak,kejap jeww ^^

Daisypath Anniversary tickers