Vectorials
Flash Perfection
3D Lessons
Tutorialkit
Markup Tutorials
Learn PHP
network
Web Programming  Home Web Programming JavaScript Banner Ads
rss

Banner Ads

Author: ViButX More by this author


1. Add the first code to the body of your document

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
var how_many_ads = 3;
var now = new Date()
var sec = now.getSeconds()
var ad = sec % how_many_ads;
ad +=1;
if (ad==1) {
txt="The World's Largest Online Bookstore, Amazon.com";
url="http://www.amazon.com";
alt="amazon.com";
banner="http://imageserv.imgis.com/images/Ad12669St1Sz1Sq1_Ban1.gif";
width="468";
height="60";
}
if (ad==2) {
txt="StupidKid.Net Greatest Site Ever";
url="http://www.stupidkid.net/";
alt="stupidkid.net";
banner="http://img.photobucket.com/albums/v370/danker2/stupidkid.gif";
width="468";
height="60";
}
if (ad==3) {
txt="Find it at GoTo.com";
url="http://www.goto.com";
alt="goto.com";
banner="http://imageserv.imgis.com/images/Ad13700St1Sz1Sq1_Ban1.gif";
width="468";
height="60";
}
document.write('<center>');
document.write('<a href="' + url + '" target="_top">');
document.write('<img src="' + banner + '" width=')
document.write(width + ' height=' + height + ' ');
document.write('alt="' + alt + '" border=0><br>');
document.write('<small>' + txt + '</small></a>');
document.write('</center>');
// End -->
</SCRIPT>

Thats it, just edit these

if (ad==2) {
txt="StupidKid.Net Greatest Site Ever";
url="http://www.stupidkid.net/";
alt="stupidkid.net";
banner="http://img.photobucket.com/albums/v370/danker2/stupidkid.gif";
width="468";
height="60";

with your info.



Author's URL: www.dannyscripts.com

Rate this Material: Bad 1 2 3 4 5 Excellent
print this page tell a friend subscribe to newsletter subscribe to rss

Add comments to "Banner Ads"