Mick Wansey Posted April 20, 2009 Share Posted April 20, 2009 images = new Array(); images[0] = "<img src ='images/b3200.jpg' title='b3200'>"; images[1] = "<img src ='images/b4200.jpg' title='b4200'>"; images[2] = "<img src ='images/fruits200.jpg' title='fruits'>"; index = Math.floor(Math.random() * images.length); document.write(images[index]); Link to comment Share on other sites More sharing options...
jeffman Posted April 20, 2009 Share Posted April 20, 2009 Maybe I'm dense . . . but what exactly are you asking? Link to comment Share on other sites More sharing options...
Mick Wansey Posted April 21, 2009 Author Share Posted April 21, 2009 Maybe I'm dense . . . but what exactly are you asking?Sorry i was not clear the imaged in this code I want to be able to make them link to other pages how do I do that Link to comment Share on other sites More sharing options...
TKW22 Posted April 21, 2009 Share Posted April 21, 2009 Sorry i was not clear the imaged in this code I want to be able to make them link to other pages how do I do thatso im guessing this is what you want?images = new Array();images[0] = "<a href='some url'><img src ='images/b3200.jpg' title='b3200'></a>";images[1] = "<a href='some url'><img src ='images/b4200.jpg' title='b4200'></a>";images[2] = "<a href='some url'><img src ='images/fruits200.jpg' title='fruits'></a>";index = Math.floor(Math.random() * images.length);document.write(images[index]); try it see if it is Link to comment Share on other sites More sharing options...
Mick Wansey Posted April 21, 2009 Author Share Posted April 21, 2009 so im guessing this is what you want?images = new Array();images[0] = "<a href='some url'><img src ='images/b3200.jpg' title='b3200'></a>";images[1] = "<a href='some url'><img src ='images/b4200.jpg' title='b4200'></a>";images[2] = "<a href='some url'><img src ='images/fruits200.jpg' title='fruits'></a>";index = Math.floor(Math.random() * images.length);document.write(images[index]); try it see if it is Thankyou that is what I wanted Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.