StefiIOE

Untitled

Sep 3rd, 2020
96
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Title</title>
  6. </head>
  7. <style>
  8. .ime
  9. {
  10. margin-right: 10px;
  11. }
  12. </style>
  13. <script>
  14. function zacuvaj() {
  15.  
  16. var datum = document.getElementById('datum').value;
  17. var tabela = document.getElementById('tabela');
  18. for (var i = 0; i < datum.length; i++) {
  19. if (datum % 1000 <= 2002) {
  20. document.write("greshka");
  21. } else {
  22. datum.push(tabela);
  23. }
  24.  
  25. var cell = document.createElement('td');
  26. var cell1 = document.createElement('td');
  27. var cell2 = document.createElement('td');
  28. var cellText=document.createTextNode('ime');
  29. var cellText1=document.createTextNode("przime");
  30. var cellText2=document.createTextNode('poeni');
  31. cell.appendChild(cellText);
  32. cell1.appendChild(cellText1);
  33. cell2.appendChild(cellText2);
  34. cell.style.backgroundColor='green';
  35. cell1.style.backgroundColor='blue';
  36. cell2.style.backgroundColor='pink';
  37. }
  38. var name=document.getElementById('ime').value;
  39. var prezime =document.getElementById('prezime').value;
  40. var poeni = document.getElementById('poeni').value;
  41.  
  42. // for(i = 0 ; i < poeni.length ; i ++)
  43. // {
  44. // if(poeni[i] > poeni[i+1] )
  45. // }
  46. }
  47. </script>
  48. <body>
  49. <div>
  50. Name <input type="text" id="ime"> <br>
  51. Surname <input type="text" id="prezime"> <br>
  52. Date of Birth<input type="date" id="datum"> <br>
  53. Points <input type="text" id="poeni"> <br>
  54. <button onclick="zacuvaj ()">Save</button>
  55. <table id="tabela">
  56. <tr>
  57. <th>
  58.  
  59. </th>
  60. </tr>
  61. </table>
  62. </div>
  63. </body>
  64. </html>
RAW Paste Data