bit of javascript help?
bit of javascript help?
Out of context: Reply #7
- Started
- Last post
- 7 Responses
- cramdesign0
Got it. In hindsight, it was easy really. For the record:
var quotes = new Array;
quotes.push( "Text 1 here." );
quotes.push( "Text 2 here." );
quotes.push( "Text 3 here." );
function quote() {
var q = quotes[(Math.floor(Math.random() * quotes.length))]
document.write( q );
}Then call quote(); where I need it to be.