Friday, 13 July 2012

Tutorial : Disable Highlight Text

Assalamualaikum & Salam Subuh Semua.
Ada Yang Belum Tido Tak? Memandangkan Sekarang Masa Aku Free & Mood Berada Dalam Keadaan Baik.Maka Aku Akan Meneruskan Entri Tutorial Kat Blog Aku Nie.Okay,Kali Nie Nak Ajar Tutorial DISABLE HIGHLIGHT TEXT.

Benda Apa tue? Boleh Makan Ke? Hehehe.Korang Mesti Tahu Kan Kewujudan COPYCATS  Yang Semua Blogger Benci.Yela,Hasil Usaha Kita Taip Entri  susah payah Tapi senang2 Orang Lain Ambil copy Paste.Mestilah Tak suka Kan.Aku dulu pernah gak Pasang kat blog,Tapi memandangkan sekarang Aku Nak Letak Banyak Tutorial Kat Blog Aku nie,So aku Tak Pakai benda tue lagi.
Oraiittt...Kalau Ada Yang Nak guna tutorial Nie,Meh Aku Ajar Step By Step K...

  • 1. Pergi ke Dashboard > Design > Add a Gadget > Html/Javascript
  • 2. Copy Code Bawah Nie Dan Paste Ke Ruang Html/Javascipt tue


<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. Save. Taraaaa..dah Siap.Senang Kan? Hehehe 

0 comments: