I'm trying to make a div box where it displays a randomized quote generated in the javascript, but it does not display when I run the code.
My html is simply
<div id="quotebox"></div>
my javascript is
var quotes = new Array()
quotes[0]="Simplicity is the ultimate sopistication";
quotes[1]="While I thought that I was learning how to live, I have been learning how to die.";
quotes[2]="The greatest deception men suffer is from their own opinions.";
quotes[3]="Art is never finished, only abandoned";
quotes[4]="Iron rusts from disuse; water loses its purity from stagnation. Even so does inaction sap the vigor of the mind.";
var randQuote=Math.floor(Math.random()*(quotes.length));
function showQuote(){
document.getElementById("quotebox").innerHTML = quotes[randQuote];
}
Am I just making a silly mistake or what is going on? I've tried several different things now and it still doesn't display to the div.