Random Quote Generator Script

  This javascript quote generator is used to view the messages randomly. This java script helps you to generate random quote or random message.


  • You can randomly view the message using this random quote generator.
  • Javascript quote generator can also be used as random number generator if we give numbers instead of text in array.
  • You can generate random quotes using this random quote generator.
  • Just copy the code and use it.


Random Quote Generator
Click Next to Display Random message


CSS Code
font-family: verdana, san-serif;font-size: 13px
Javascript Code

< !-- Script by hscripts.com -->
<script type="text/javascript">
var arr= new Array();
arr.push("Javascript is a client-side scripting language");
arr.push("Javascript is different from Java");
arr.push("CSS - Cascading Style Sheet");
arr.push("HTML is a platform independent language");
function rotate()
var num= Math.round(Math.random()*3);
function add(i)
var chi = document.createTextNode(arr[i]);
var tab1 = document.getElementById("add1");
< !-- Script by hscripts.com -->


<table align=center style="background-color:#C0C0C0";>
<td background-color:#C0C0C0 align=center width=300 style="font-family:Times New Roman;">
<b>Random Quote Generator
<td id=add1 class=row width=300 align=center>Click Next to Display Random message</td>
<tr><td align=center>
<input type=button value="Next" border=0 onclick="rotate()"></td></tr>
  • Release Date - 04-01-2008
  • Get free version without ©copyright link for just $10/-
  • For customization of this script or any script development, mail to support@hscripts.com


  • Copy the codes given in the textarea and use it.
  • Here (Math.random()*3) is used in order to get the message from the array of zero'th position to fourth position.
  • CSS code is used to design the page with some styles as background-color, font-color etc.
  • Array values are randomly generated using arr.push()method.


Related Scripts

Free Javascript Scripts

Ask Questions

Ask Question