
Solusi untuk mengatasi masalah tersebut, anda dapat menampilkan tombol pengganti jenis dan ukuran huruf sehingga pengunjung dapat memilih sendiri jenis dan ukuran huruf yang mereka sukai.
Sebagai contoh, coba anda pilih salah satu jenis dan ukuran huruf dibawah ini :
Tombol pengganti huruf diatas dapat dipasang pada postingan maupun sidebar. Namun walaupun dipasang dibagian manapun pada blog anda, perubahan jenis dan ukuran huruf hanya berlaku untuk huruf pada postingan dan tidak mempengaruhi jenis dan ukuran huruf bagian lain dari blog anda. Kode yang digunakan untuk menampilkan tombol pengganti jenis dan ukuran huruf pada postingan seperti dibawah ini :
<script>
function go1(){ if (document.selecter2.select2.options [document.selecter2.select2.selectedIndex].value != "none") { document.getElementById('main').style.fontSize =document.selecter2.select2.options [document.selecter2.select2.selectedIndex].value } } function go2(){ if (document.selecter2.select3.options [document.selecter2.select3.selectedIndex].value != "none") { document.getElementById('main').style.fontFamily =document.selecter2.select3.options [document.selecter2.select3.selectedIndex].value } }
</script> <form id="forma" method="POST" name="selecter2">
<select name="select3" onchange="go2()" size="1" style="font-family: verdana; font-size: 8pt;"> <option value="Times New Roman">Times New Roman </option><option value="Arial">Arial </option><option selected="selected" value="Book Antiqua">Book Antiqua </option><option value="Bookman Old Style">Bookman Old Style </option><option value="Century Gothic">Century Gothic </option><option value="Comic Sans Ms">Comic Sans Ms </option><option value="Tahoma">Tahoma </option><option selected="selected" value="Trebuchet Ms">Trebuchet Ms </option><option value="Verdana">Verdana </option></select> <select name="select2" onchange="go1()" size="1" style="font-family: verdana; font-size: 8pt;"> <option value="8px">8 </option><option value="9px">9 </option><option value="10px">10 </option><option value="11px">11 </option><option selected="selected" value="12px">12 </option><option value="14px">14 </option><option value="16px">16 </option><option value="18px">18 </option></select></form>
Copy kode diatas dan paste pada tempat dimana tombol pengganti huruf akan ditampilkan
Selamat mencoba, semoga bermanfaat...
Posting Komentar