daily pastebin goal
85%
SHARE
TWEET

Untitled

a guest Jun 14th, 2018 60 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <html>
  2. <head>
  3. <meta name="Author" content="Josh Aldaba">
  4. </head>
  5.  
  6.  
  7. <body>
  8.  
  9.  
  10.  
  11. <form name="button">
  12. <button type="num" onclick="reload()">Generate Number</button>
  13. <input type = text Name="num" value="" size="4">
  14. </form>
  15.  
  16.  
  17. <img src="" id="1" style="left: 10px; position:absolute;top:100px">
  18.  
  19. <img src="" id="2" style="left: 210px; position:absolute;top:100px">
  20.  
  21. <img src="" id="3" style="left: 410px; position:absolute;top:100px">
  22.  
  23. <img src="" id="4" style="left: 610px; position:absolute;top:100px">
  24.  
  25. <img src="" id="5" style="left: 810px; position:absolute;top:100px">
  26.  
  27.  
  28.  
  29. </body>
  30.  
  31.  
  32. <script language="Javascript">
  33. <!-- Hide the script from old browsers--
  34.  
  35. var randomnum = Math.floor(5*Math.random())+1;
  36.  
  37.  
  38. document.button.num.value=randomnum-1
  39.  
  40. if (randomnum == 5){
  41. for(var i=1;i<5;i++){
  42. document.getElementById(i).src ="man.gif"}
  43. }
  44.  
  45. if (randomnum == 4){
  46. for(var i=1;i<4;i++){
  47. document.getElementById(i).src ="man.gif"}
  48. }
  49.  
  50. if (randomnum == 3){
  51. for(var i=1;i<3;i++){
  52. document.getElementById(i).src ="man.gif"}
  53. }
  54.  
  55. if (randomnum == 2){
  56. for(var i=1;i<2;i++){
  57. document.getElementById(i).src ="man.gif"}
  58. }
  59.  
  60. if (randomnum == 1){document.getElementById(i).src ="man.gif"}
  61.  
  62.  
  63.  
  64. </script>
  65.  
  66. </html>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top