I'm a beginner web designer and I need to know how can I link one thing to another. The thing is that I'm making different quotes change every time the site refreshes.
And I need to do the same thing with images that are located in a different div tag. The reason I need to link them is because the image needs to coordinate with the quote.
For example: quote 0 with image 0.
Here is the javascript code:
var quotes=new Array();
quotes[0] = text1;
quotes[1] = Text2;
quotes[2] = text3;
quotes[3] = text4;
var q = quotes.length;
var whichquote=Math.round(Math.random()*(q-1));
function showquote(){document.write(quotes[whichquote]);}
showquote();
And this is the code that is located the javascript text:
<script language=javascript type=text/javascript src=quotes.js></script>