Tạo 4 banner ngẫu nhiên cho blog


  1. Vào Blogger >Thiết kế > Chọn phần tử trang 
  2. Chọn HTML/JavaScript Widget
  3. Và dán code bên dưới vào trong và save lại.
<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='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' 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='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' 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='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' 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='URL OF BANNER’S IMAGE-1' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
images[1] = "<a href = 'URL OF ADVERTISER' rel='nofollow' ><img src='URL OF BANNER’S IMAGE-2' border='0' height='125' width='125' alt='AD DESCRIPTION'></a>";
index = Math.floor(Math.random() * images.length);
document.write(images[index]);
</script>

</td></center>
</tr>
</tbody></table>
<table border="0" bordercolor="#0084ce" cellpadding="2" cellspacing="6" width="265" bgcolor="#ffffff">
<tbody>
<tr>
<td><center><a href="URL OF ADVERTISER" rel="nofollow"><img width="265" height="37" border="0" alt="Advertise Now!" src="file:///C:/Documents%20and%20Settings/Mohammad/Desktop/ADVERTISE-HERE.gif" /></a></center></td>
</tr>

</tbody></table>
</div>

Hướng dẫn :
1.Thay thế URL OF ADVERTISER với link web muốn quảng cáo
2.Thay thế URL OF BANNER’S IMAGE-1 and URL OF BANNER’S IMAGE-2 với ảnh banner muốn quảng cáo
3.  Thay thế  AD DESCRIPTION với một vài thông tin quảng cáo.
4.  Nếu bạn muốn thay đổi kích thước hình cho phù hợp thì cho thay đổi width="265"

Chúc bạn thành công.