Random Quote in Alert

[Total: 0    Average: 0/5]

This chooses a random string to show in the alert.

Body Code:

<SCRIPT LANGUAGE="JavaScript">

<!-- Begin
function getMessage() {
var ar = new Array(10)
// Learn English - write here strings, type Random Quote, & get different strings
ar[0] = "no 1"
ar[1] = "no 2"
ar[2] = "no 3"
ar[3] = "no 4"
ar[4] = "no 5"
ar[5] = "no 6"
ar[6] = "no 7"
ar[7] = "no 8"
ar[8] = "no 9"
ar[9] = "no 10"
var now = new Date()
var sec = now.getSeconds()
alert("String: " + ar[(sec+1) % 10])
}
// End -->
</SCRIPT>
<CENTER><FONT SIZE=+3>Random Quote</FONT></CENTER><BR>

<CENTER>
<FORM>
<INPUT TYPE="button" VALUE="Random Quote" onClick="getMessage()">
</FORM>
</CENTER>

Times Viewed: 0

Leave a Reply

Your email address will not be published. Required fields are marked *