Skip to content

Instantly share code, notes, and snippets.

@spearson
Created February 25, 2011 22:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save spearson/844635 to your computer and use it in GitHub Desktop.
Save spearson/844635 to your computer and use it in GitHub Desktop.
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