Banner yang random untuk blog
Widget yang akan menunjukkan banner secara rawak kat blog korang apabila pelawat klik pada page yang baru atau pun bila refresh(F5).Jadi korang boleh letak lebih dari empat banner.
Sila lihat Demo(perhatikan pada sidebar Iklan,dan klik F5 untk lihat banner berubah)
Ok,ikut Langkah langkah ni:
1. Sign in ke Blogger > Design/Layout > Page Elements
2. Pilih HTML/JavaScript
3. Dan pastekan kod ni didalamnya
<div align="center">
<table border="0" cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">
<tbody><tr>
<td><center>
<!-- BANNER#1 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyPw5ZFjZxPyBNWvHcqGpjVyLvPgsls7EjMBXUWl41rh21C0crUiJ0T5F-ZIvnl_mdzlGH_dFtw5k05b4b6uspjYW_27HTLBbwWXtm4N8XT0ETLlMg5WbQKEpjmnEIamNOIT5J5uikmYg/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUD11GKDcLG6bKsl7LBTW1Jf9xGKQsbe344IVc3cJnxYTkdEBb6o_sHZaZ7S7teb2Pet9WEYOpSXvQuI6KYijjiHS_vUUvTTz3NtFau5jx9y8dyVHftosqh2oBIcFksNbGsiaSlw_srIc/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
<td><center>
<!-- BANNER#2 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNAvMroMpZWVgv8FF_vOioMC7DUbFn3n9O6uYlr7u1U2-6-BNxLDP1yHdFy6kZ85doUxGtcyRZDP0uQ_7Cyfuye_zn0DmQbAzFlHbOXvMsAV0gHUJf4KzXwfttlskpAoMn3x-4rnkXy10/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgiFX_olnKUOe5mls2nF0htIXluiDX011yJtn758lujEzrr3uuVD8xWsFbxI8duGShu6uHPuL6fM_Xhiycsjaco1K3AO-5jLnQvxjQSgQ4f1fJobJ1POGzTVNtHeDfsIXKQGBo9St8cIA/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
</tr>
<tr>
<td><center>
<!-- BANNER#3 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhybCvt2UrBODOwEhujOtj_zZ4ufxAmc2hy54GBviAYru2SK3pP78Sm5XaQs3s2_tBcRcueWCFEg8tCGGN_TAs6h6WhyphenhyphenZSGBMJke9wzsojDvT9h-HZdfdUhDFF3ZSQGMiYj8hekE9LIa4c/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-HfHLqTCJt93VpN92lqBswktLRotBkNWFEJDMmURNRH2T_vgcQklnreJdtgYs0hC0wDI1Yav357qD8mxFze6rErwimd0Lg8K7NUb9r16srj1uOmPY-jxy6HFOWuD4Z3a7w-M_6PGwdLM/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
<td><center>
<!-- BANNER#4 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKgx1tBg9NJV-luGt5rJpD4xPPZgBaeN5waKIakrxzEODngbXXOtX4DrBMysWJjCfHkOAEvEoBe4wV24XoC0oBUoLdHAVqBOm1vlcH645du7NhH_HNOqbV9WTpEAkZm34QKAzTNTCC704/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3sKIIqshklIA3jJOYdAS6jOsaJh4o1rJANYQJIHHNNO5mn71ckJlbr2T79VMXE39EW86lPFvBrizmCfnEmWCg-lzHHgLqdbcIQcK4oygEbWTaMFbNJCxeZqYvC-mqCyhmaX1CN0shQe0/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
</tr>
</tbody></table>
<table border="0" bordercolor="#0084ce" cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">
<tbody>
<tr>
</tr></tbody></table>
</div>
<table border="0" cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">
<tbody><tr>
<td><center>
<!-- BANNER#1 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgyPw5ZFjZxPyBNWvHcqGpjVyLvPgsls7EjMBXUWl41rh21C0crUiJ0T5F-ZIvnl_mdzlGH_dFtw5k05b4b6uspjYW_27HTLBbwWXtm4N8XT0ETLlMg5WbQKEpjmnEIamNOIT5J5uikmYg/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiUD11GKDcLG6bKsl7LBTW1Jf9xGKQsbe344IVc3cJnxYTkdEBb6o_sHZaZ7S7teb2Pet9WEYOpSXvQuI6KYijjiHS_vUUvTTz3NtFau5jx9y8dyVHftosqh2oBIcFksNbGsiaSlw_srIc/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
<td><center>
<!-- BANNER#2 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNAvMroMpZWVgv8FF_vOioMC7DUbFn3n9O6uYlr7u1U2-6-BNxLDP1yHdFy6kZ85doUxGtcyRZDP0uQ_7Cyfuye_zn0DmQbAzFlHbOXvMsAV0gHUJf4KzXwfttlskpAoMn3x-4rnkXy10/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhgiFX_olnKUOe5mls2nF0htIXluiDX011yJtn758lujEzrr3uuVD8xWsFbxI8duGShu6uHPuL6fM_Xhiycsjaco1K3AO-5jLnQvxjQSgQ4f1fJobJ1POGzTVNtHeDfsIXKQGBo9St8cIA/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
</tr>
<tr>
<td><center>
<!-- BANNER#3 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhybCvt2UrBODOwEhujOtj_zZ4ufxAmc2hy54GBviAYru2SK3pP78Sm5XaQs3s2_tBcRcueWCFEg8tCGGN_TAs6h6WhyphenhyphenZSGBMJke9wzsojDvT9h-HZdfdUhDFF3ZSQGMiYj8hekE9LIa4c/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-HfHLqTCJt93VpN92lqBswktLRotBkNWFEJDMmURNRH2T_vgcQklnreJdtgYs0hC0wDI1Yav357qD8mxFze6rErwimd0Lg8K7NUb9r16srj1uOmPY-jxy6HFOWuD4Z3a7w-M_6PGwdLM/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
<td><center>
<!-- BANNER#4 -->
<script language="JavaScript">
images = new Array(2);
images[0] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiKgx1tBg9NJV-luGt5rJpD4xPPZgBaeN5waKIakrxzEODngbXXOtX4DrBMysWJjCfHkOAEvEoBe4wV24XoC0oBUoLdHAVqBOm1vlcH645du7NhH_HNOqbV9WTpEAkZm34QKAzTNTCC704/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEh3sKIIqshklIA3jJOYdAS6jOsaJh4o1rJANYQJIHHNNO5mn71ckJlbr2T79VMXE39EW86lPFvBrizmCfnEmWCg-lzHHgLqdbcIQcK4oygEbWTaMFbNJCxeZqYvC-mqCyhmaX1CN0shQe0/?imgmax=800' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>
</center></td>
</tr>
</tbody></table>
<table border="0" bordercolor="#0084ce" cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">
<tbody>
<tr>
</tr></tbody></table>
</div>
Gantikan kod hijau dengan gambar/banner yang korang ingin dan kod merah adalah url untuk link banner tersebut.Ok,harap korang suka.Biru jika nak letak penerangan berkaitan iklan,biarkan camtu pun bleh.
1 ulasan :
banyak nye kod... B-)
ReplyNota: Hanya ahli blog ini sahaja yang boleh mencatat ulasan.