hw08_14_!Divide.html 450 B

123456789101112131415161718
  1. <header>
  2. <h1>Divide</h1>
  3. </header>
  4. <body>
  5. <input type='number' id="firstNumber" />
  6. <input type='number' id="secondNumber" />
  7. <div id="divisionResult">
  8. текст в div
  9. </div>
  10. <script>
  11. const calcResult = () =>
  12. divisionResult.innerHTML = Math.floor(firstNumber.value / secondNumber.value);
  13. firstNumber.oninput = secondNumber.oninput = calcResult
  14. </script>
  15. </body>