January 15th, 2013, 07:57 AM
Onload random div content?
Every time a visitor loads a page, say, the homepage, I need for it to play either:
... in the same div, for example, to make it easier.
This must be random. How can I possibly achieve this?
Thanks in advance!
January 15th, 2013, 09:03 PM
var banners = new Array("../flash/banner1.swf","../flash/banner2.swf");
document.getElementById("banner").src = banners[Math.round(Math.random()*(banners.length-1))];