Simple Machine Codes
April 20, 2024, 03:01:47 am
Welcome, Guest. Please login or register.

Login with username, password and session length
News: Welcome to SMC, the best place for your SMF For Free Codes
 
  Home Help Search Arcade Gallery Affiliates Code Index Staff List Calendar Members Login Register  

Random Banner

Pages: [1]   Go Down
  Print  
Author Topic: Random Banner  (Read 394 times)
0 Members and 1 Guest are viewing this topic.
Agent Moose
Administrator

Offline Offline

Gender: Male
Posts: 2,672



View Profile WWW
« on: August 14, 2007, 10:24:28 pm »

Code:
<script>
var randbanner = []
//Created by Agent Moose (smcodes.smfforfree3.com)
randbanner[0]=["URL"]

rawr = Math.floor(Math.random()*randbanner.length)
document.write("<center><img src='" + randbanner[rawr][0] + "' /></center>")
</script>
Place it where ever you want your banners to show.
URL = the URL of the image

To add more, just add more of these lines:
randbanner[0]=["URL"]

Change the 0 to a 1, if you add another line after that, you would change the 1 to a 2.
Report Spam   Logged

Share on Facebook Share on Twitter



Pages: [1]   Go Up
  Print  
 
Jump to:  

Powered by EzPortal
Bookmark this site! | Upgrade This Forum
SMF For Free - Create your own Forum

Powered by SMF | SMF © 2016, Simple Machines
Privacy Policy