Advertisement
Guest User

Untitled

a guest
Oct 19th, 2018
65
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.46 KB | None | 0 0
  1. <html>
  2. <head>
  3. <meta charset="utf-8" />
  4. <title></title>
  5. <link href="file:///C:\Users\5ainfgr3\Documents\JS\css.css" rel="stylesheet">
  6. <script src = "javascript.js"></script>
  7. </head>
  8. <body>
  9. <input type="button" value="go!" onclick="init()"/>
  10. <center>
  11. <div class="wrapper">
  12. <font face="tahoma" color="green">
  13. <table id="userpin" align="center">
  14. <tr>
  15. <th id="mycell1" onclick="tast(x[0])">1</th>
  16. <th id="mycell1" onclick="tast(x[0])">1</th>
  17. <th id="mycell1" onclick="tast(x[0])">1</th>
  18. <th id="mycell1" onclick="tast(x[0])">1</th>
  19. <th id="mycell1" onclick="tast(x[0])">1</th>
  20. <th id="mycell1" onclick="tast(x[0])">1</th>
  21. </tr>
  22. </table>
  23. <table id="numpad" style="width:40%" align="center">
  24. <tr >
  25. <th id="mycell1" onclick="tast(x[0])">1</th>
  26. <th id="mycell2" onclick="tast(x[1])">2</th>
  27. <th id="mycell3" onclick="tast(x[2])">3</th>
  28. </tr>
  29. <tr>
  30. <th id="mycell4" onclick="tast(x[3])">4</th>
  31. <th id="mycell5" onclick="tast(x[4])">5</th>
  32. <th id="mycell6" onclick="tast(x[5])">6</th>
  33. </tr>
  34. <tr>
  35. <th id="mycell7" onclick="tast(x[6])">7</th>
  36. <th id="mycell8" onclick="tast(x[7])">8</th>
  37. <th id="mycell9" onclick="tast(x[8])">9</th>
  38. </tr>
  39. <tr>
  40. <th id="mycell10" onclick="tast(x[9])">0</th>
  41. <th id="mycell11" onclick="tast(10)">Cancel</th>
  42. </tr>
  43. </table>
  44. </center>
  45. </font>
  46. </div>
  47. <div class="wrapper">
  48. <button class="button">Avanti</button>
  49. </div>
  50. </body>
  51. </html>
  52.  
  53. function init() {
  54. var i;
  55. var x = [0, 1, 2, 3, 4, 5, 6, 7, 8, 9];
  56. var currentIndex = x.length, temporaryValue, randomIndex;
  57.  
  58. while (0 !== currentIndex) {
  59. randomIndex = Math.floor(Math.random() * currentIndex);
  60. currentIndex -= 1;
  61.  
  62. temporaryValue = x[currentIndex];
  63. x[currentIndex] = x[randomIndex];
  64. x[randomIndex] = temporaryValue;
  65. }
  66. for (i = 0; i < 10; i++){
  67. var g = "mycell" + (i + 1);
  68. document.getElementById(g).innerText=(x[i]);
  69. }
  70.  
  71. }
  72.  
  73. //numbers = shuffle(numbers);
  74. //console.log(JSON.stringify(numbers));
  75.  
  76. var clienti = [
  77. { id: 100, pin: "012345", nome: "Alessio Napoletano" },
  78. { id: 101, pin: "295169", nome: "Andrea Pisu" },
  79. { id: 102, pin: "365341", nome: "Patrick Beghi" },
  80. ]
  81.  
  82. var campi= [
  83. { cod: 0b000111, campo: " ***" },
  84. { cod: 0b000111, campo: " ***" },
  85. { cod: 0b000111, campo: " ***" },
  86. { cod: 0b000111, campo: " ***" },
  87. { cod: 0b000111, campo: " ***" },
  88. { cod: 0b000111, campo: " ***" },
  89. { cod: 0b000111, campo: " ***" },
  90. { cod: 0b000111, campo: " ***" },
  91. { cod: 0b000111, campo: " ***" },
  92. { cod: 0b000111, campo: " ***" },
  93. { cod: 0b000111, campo: " ***" },
  94. { cod: 0b000111, campo: " ***" },
  95. { cod: 0b000111, campo: " ***" },
  96. { cod: 0b000111, campo: " ***" },
  97. { cod: 0b000111, campo: " ***" },
  98. { cod: 0b000111, campo: " ***" },
  99. { cod: 0b000111, campo: " ***" },
  100. { cod: 0b000111, campo: " ***" },
  101. { cod: 0b000111, campo: " ***" },
  102. ]
  103.  
  104. table, th, td{
  105. border: 2px solid orange;
  106. border-radius: 15px;
  107. }
  108. th, td{
  109. width: 20%;
  110. height: 100px;
  111. padding: 5px;
  112. }
  113. table{
  114. border-spacing: 50px;
  115. }
  116. .button {
  117. background-color: rgb(255, 97, 6);
  118. border: 3px;
  119. border-radius: 15px;
  120. color: white;
  121. padding: 15px 25px;
  122. text-align: center;
  123. font-size: 16px;
  124. cursor: pointer;
  125. margin: 15px;
  126. }
  127.  
  128. .button:hover {
  129. background-color: green;
  130. }
  131.  
  132. .wrapper {
  133. text-align: center;
  134. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement