Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var NumberOfWords = 5
- var words = new BuildArray(NumberOfWords)
- // Use the following variables to
- // define your random words:
- words[1] = "amar.shlomo@gmail.com:Salomon1"
- words[2] = "davecassam@hotmail.com:1mEdhurSt2"
- words[3] = "baturray_yo@hotmail.com:vergara"
- words[4] = "bruno_minig-unit@hotmail.com:bruno9"
- words[5] = "loopez_x@hotmail.com:barcelona13"
- function BuildArray(size){
- this.length = size
- for (var i = 1; i <= size; i++){
- this[i] = null}
- return this
- }
- function PickRandomWord(frm) {
- // Generate a random number between 1 and NumberOfWords
- var rnd = Math.ceil(Math.random() * NumberOfWords)
- // Display the word inside the text box
- frm.WordBox.value = words[rnd]
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement