123456789101112131415161718 |
- <header>
- <h1>Divide</h1>
- </header>
- <body>
- <input type='number' id="firstNumber" />
- <input type='number' id="secondNumber" />
- <div id="divisionResult">
- текст в div
- </div>
- <script>
- const calcResult = () =>
- divisionResult.innerHTML = Math.floor(firstNumber.value / secondNumber.value);
-
- firstNumber.oninput = secondNumber.oninput = calcResult
- </script>
- </body>
|