index.html 1.5 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. <!DOCTYPE html>
  2. <html lang="ru,en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>Document</title>
  6. <link rel="preconnect" href="https://fonts.gstatic.com">
  7. <link href="https://fonts.googleapis.com/css2?family=Chakra+Petch&display=swap" rel="stylesheet">
  8. <style>body{font-family: 'Chakra Petch', sans-serif;};
  9. input{font-family: 'Chakra Petch', sans-serif;};
  10. </style>
  11. </head>
  12. <body>
  13. <!-- 1 task -->
  14. <div class="hw1">
  15. <h2>calculator :</h2>
  16. <input id="numb1" onkeyup="this.value = this.value.replace(/[A-Za-zА-Яа-яЁё-і]/, '');"/>
  17. <select id="act">
  18. <option value="plus">+</option>
  19. <option value="min">-</option>
  20. <option value="multiply">x</option>
  21. <option value="division">/</option>
  22. </select>
  23. <input id="numb2" onkeyup="this.value = this.value.replace(/[A-Za-zА-Яа-яЁё-і]/, '');"/>
  24. <button onclick="calc()">=</button>
  25. <p id="result">00.00</p>
  26. </div>
  27. <!-- 2 task -->
  28. <div class="hw2">
  29. <h2>array :</h2><h2 id="mass"></h2>
  30. <p>add to array</p>
  31. <input id="pushInp"/>
  32. <button onclick="gets()">add</button>
  33. <p>remove from array</p>
  34. <input id="setNumb"/>
  35. <button onclick="sets()">dell</button>
  36. </div>
  37. <!-- 3 task -->
  38. <div class="hw3">
  39. <h2>calculator :</h2>
  40. <input id="number" onkeyup="this.value = this.value.replace(/[A-Za-zА-Яа-яЁё-і]/, '');"/>
  41. <button onclick="proCalc()">=</button>
  42. <p id="resultat">00.00</p>
  43. </div>
  44. <script src="../HwJs1/js/script.js"></script>
  45. </body>
  46. </html>