123456789101112131415161718192021222324 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta http-equiv="X-UA-Compatible" content="IE=edge">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>Divide</title>
- </head>
- <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>
- </html>
|