Firstly, I am not a web designer and I have very limited knowledge of html, css, javascript etc.
I am running a script which displays a random image each time the page is refreshed. I would like to know, how I can set a click through link that allows the user to click on the random image and follow through to another web page.
The script im using is below. Ideally, I'd like to be able to click on the image and then be sent to a definition of the word.
For example, when "expose.png" is shown, id like to be able to click on the image and be taken to, http://oxforddictionaries.com/definition/english/expose?q=expose
please help.
<a href="javascript:document.location.reload();"
ONMOUSEOVER="window.status='Refresh'; return true">
<img src="Graphic-design-can-[TEST].png" width="auto" height="auto"//>
</a>
</div>
<div id="outcome">
<script language="JavaScript">
function random_imglink(){
var myimages=new Array()
myimages[1]="expose.png"
myimages[2]="inform.png"
myimages[3]="explain.png"
myimages[4]="formulate.png"
myimages[5]="record.png"
myimages[6]="mediate.png"
myimages[7]="design.png"
myimages[8]="persuade.png"
myimages[9]="summarise.png"
myimages[10]="generate.png"
var ry=Math.floor(Math.random()*myimages.length)
if (ry==0)
ry=1
document.write('<img src="'+myimages[ry]+'" border=0>')
}
random_imglink()
</script>
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…