Jump to content

How Do I Add A Hyperlink


Mick Wansey

Recommended Posts

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

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
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

Link to comment
Share on other sites

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

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...