Snippet #2: Show a Random Quote
Here's the Code:
<script type="text/javascript">
//these are your quotes - we've included three
var message = new Array(
'I do not fear computers. I fear the lack of them. <strong style="font-size: 10px;">-Isaac Asimov</strong>',
'Never trust a computer you can\'t throw out a window. <strong style="font-size: 10px;">-Steve Wozniak</strong>',
'Why think? We have computers to do that for us. <strong style="font-size: 10px;">-Jean Rostand</strong>'
);
// if you want to include more quotes - increase the number three to how many you have
var rand = Math.floor(Math.random() * 3);
//this writes the quote to the page
document.write('"'+message[rand]+'"');
</script>
It displays a Quote that changes each time a user refreshes your web page!
Should you wish to use either of these snippets, just highlight the code in the 'code box' and paste it under the <body> tag in your webpage!
|