Js array of random text

JAVASCRIPT random display of text information, the text information stored in an array in JavaScript, refresh the page every time, records show that a randomly selected from the array, as to how many text messages can be stored, you need to set a very good practical web text effects.

 

gggyg

<-! Hide
var A = Math.random () + "" // generates a random number
var rand1 = a.charAt (9) // this number to fifth character (real or from 0 to 9 digital)
QUOTES = new new array // create a message array
quotes [1] = 'Welcome' // allocate ten random text appears here
quotes [2] = 'Please note that this information'
QUOTES [3] = 'thank you for using the book '
QUOTES [4] =' JavaScript, good special effects language '
QUOTES [5] =' JavaScript is not the Java '
QUOTES [6] =' Welcome to this effect can be used to write the word '
QUOTES [7] =' every time you enter the information here can refresh '
QUOTES [8] =' I love JavaScript '
QUOTES [9] =' JavaScript, beautiful language '
QUOTES [0] =' JavaScript is simple, easy '
var quote = QUOTES [RAND1] // selected by random sentence
// ->

 
 

<-! Hide
document.write (quote) // The choice of words written above page
// ->

 

  

Guess you like

Origin www.cnblogs.com/bruceau/p/11762502.html