Created
February 25, 2011 22:30
-
-
Save spearson/844635 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var quotes = [ | |
"A deadline a day keeps the programmers at bay." | |
, "The horn on the bus goes beep beep beep." | |
, "Words are filthy." | |
, "Silly hats only." | |
, "This is a quote." | |
, "Meow do you know how fast you were going?" | |
]; | |
function changeQuote() { | |
var randomQuoteIndex = Math.floor(Math.random() * quotes.length); | |
var newQuote = quotes[randomQuoteIndex]; | |
document.quoteform.quote.value = newQuote; | |
} | |
window.onload = function() { | |
changeQuote(); | |
setInterval("changeQuote()", 2000); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment