Advertisement
Guest User

Untitled

a guest
Nov 23rd, 2018
104
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. var NumberOfWords = 5
  2.  
  3. var words = new BuildArray(NumberOfWords)
  4.  
  5. // Use the following variables to
  6. // define your random words:
  7. words[1] = "amar.shlomo@gmail.com:Salomon1"
  8. words[2] = "davecassam@hotmail.com:1mEdhurSt2"
  9. words[3] = "baturray_yo@hotmail.com:vergara"
  10. words[4] = "bruno_minig-unit@hotmail.com:bruno9"
  11. words[5] = "loopez_x@hotmail.com:barcelona13"
  12.  
  13.  
  14. function BuildArray(size){
  15. this.length = size
  16. for (var i = 1; i <= size; i++){
  17. this[i] = null}
  18. return this
  19. }
  20.  
  21. function PickRandomWord(frm) {
  22. // Generate a random number between 1 and NumberOfWords
  23. var rnd = Math.ceil(Math.random() * NumberOfWords)
  24.  
  25. // Display the word inside the text box
  26. frm.WordBox.value = words[rnd]
  27. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement