10.10.11

Tutorial : Disable Highlight Pada Text


Hai...korang...hari tu mirul ada buat tutorial pasal diactive right click ,tapi lupa pulak yang orang boleh copy entry kite dengan " Ctrl + C " .kali ni mirul nak buat tutorial disable right click,dan korang boleh gabungkan tutorial ni bersama tutorial diactive right click ,now...orang x leh nak copy cat entry korang... :)

dah2...jom mula....

1 ) Pergi ke " dashboard " ,then klik pada " design ".
2) Tekan pada "Page Element " dan ambil " Add Page Element "
3) Ambil " HTML/JAVA SCRIPT " ..dan masukkan kod-kod di 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>

4) Dah siap..korang save lah..:)

senag kan...korang try lah gabungkan tutorial nie ngan tutorial diactive right click yg dulu mirul ajar 2....click sinie :)

p/s : kemana...solehah menghilang nie yer...bz kot...hehe ^.^

1 comment:

Ziey said...

(y) THANZ

 
Design by AH|SW |Empayar Bintang Tiga 2013