Snap Builder Public Codes Library
Snap | Generators | Login | Browse | Search | Enter Code | Export Snap Builder Public Codes Library


Category: Javascript Codes Library >> Miscellaneous Snippets >> Random Quote Display

Code Snippet </> Info

Snippet Name: Random Quote Display

Description: The Random Quote Display code snippet allows you to display random quotes customized by you.

Compatible Browsers:
Chrome BrowserFirefox BrowserInternet Explorer BrowserOpera BrowserSafari Browser

Example: View Code Demo

Note: Adjust messages to suit your needs.

Author: Snap Builder <>

Last Modified: 2019-12-09 21:48:07

Language: javascript

Highlight Mode: javascript

Copy Codes: Use Free Notepad ++
Bookmark and Share

Snap HTML Code Editor:
Paste the source code, make changes and instantly see it in live preview.
Snap HTML Code Editor

  About Copying
Copied To Clipboard!

<!DOCTYPE html> <head> <title>Random Quote Display Code Snippet</title> <style> BODY {font-family:verdana,arial,ms sans serif; font-size:90%;background-color:#ffffff;color:#000000;} #wrapper {margin:0; padding:15px 15px 15px 15px;} </style> <script language="javascript"> <!-- Begin Random Quote Display // == This Script Free To Use Providing This Notice Remains == // // == This Script Has Been Found In The Free Public Codes Library == // // == NOTICE: Though This Material May Have Been In A Public Depository, Certain Author Copyright Restrictions May Apply == // // var snapmsg = new Array(4); - change message count to reflect message count below var snapmsg = new Array(4); // You may add as many quote messages as you need - simply number each in sequential order snapmsg[0] = "Type \"about:cache\" into your browser to find everything that is stored in your cache folder."; snapmsg[1] = "Hold down the shift key when pressing reload to clear a page\'s items from cache."; snapmsg[2] = "Type \"view-source:\" preceding a document\'s URL to automatically view the page source code."; // add a message that includes a url with the example below snapmsg[3] = "Get valuable webmaster resources absolutely free at <a href=\"http:\/\/\"><\/a> website."; // --> </script> </head> <body> <div id="wrapper"> <p>The Random Quote Display code snippet allows you to display random quotes customized by you.</p> <p><b>Today's quote is: <script language="javascript"> // Place this snippet where the random quotes will be displayed. var Quote = snapmsg[Math.round((snapmsg.length - 1) * Math.random())]; document.write(Quote); </script></b></p> </div> </body> </html>

[ Snippet Options ]


© 2002 -  Snap Builder Public Codes Library