kode 1
<script type="text/javascript">kode 2
function bgChange(bg)
{
document.body.style.background=bg;
}
</script><table width="100%" height="15px" border="1px">
<tbody><tr style="text-align: center;font-weight:bold; color:Black;">
<td onclick="bgChange('url(http://img338.imageshack.us/img338/3518/tesxa.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">V</td>
<td onclick="bgChange('url(http://img585.imageshack.us/img585/964/tesou.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">A</td>
<td onclick="bgChange('url(http://img694.imageshack.us/img694/2540/tesaz.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">R</td>
<td onclick="bgChange('url(http://img849.imageshack.us/img849/2701/tesbi.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">I</td>
<td onclick="bgChange('url(http://img192.imageshack.us/img192/4752/blog4ys.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">A</td>
<td onclick="bgChange('url(http://img542.imageshack.us/img542/7716/blog5.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">S</td>
<td onclick="bgChange('url(http://img406.imageshack.us/img406/6034/tesjb.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">I</td>
<td onclick="bgChange('url(http://img59.imageshack.us/img59/1149/tesp.jpg) repeat-x fixed top center')" bgcolor="#FFFFFF">!</td>
</tr>
</tbody></table>
<div class="widget-content">
<select height="50" name="DADcbgc" onchange="document.body.style.background = this.value;this.style.background = this.value;" title="Change Background Image" width="150">
<option value="url() repeat center center fixed">None
</option><option value="url(http://cdn.indowebster.com/www42.indowebster.com/7dd2ae51f4b0cb792d3a435dc953f5cc_thumbnail.gif) repeat center center fixed">Red Matrix
</option><option value="url(http://lh5.googleusercontent.com/_GaKwmMcf4N4/TZGC7UA67RI/AAAAAAAAEv0/ehJ-oez_akU/DADbluematrix.gif) repeat center center fixed">Blue Matrix
</option><option value="url(http://lh3.googleusercontent.com/_GaKwmMcf4N4/TZGC9O9ZNUI/AAAAAAAAEv8/Idjb8xIrw60/DADgreenmatrix.gif) repeat center center fixed">Green Matrix
</option></select></div>
Untuk penyimpanan kode script di atas dengan cara silahkan log in terlebih dahulu di blog sobat >> klik Rancangan >> klik ADD Gadget >> klik HTML/Javascript , kemudian paste script diatas , simpan dan lihat hasilnya semoga bermanfaat
Catatan : Silahkan sobat ganti teks yang berwarna merah di atas dengan alamat link gambar pilihan sobat
untuk contoh silahkan klik DEMO
sumber : http://variasiblogger.blogspot.com/2012/03/cara-membuat-widget-ganti-background.html
Tidak ada komentar :
Posting Komentar