Browse Source

HW_07 (Function) done

Graf15 2 years ago
parent
commit
5cf9321736
2 changed files with 567 additions and 0 deletions
  1. 32 0
      js/js_07/index.html
  2. 535 0
      js/js_07/index.js

+ 32 - 0
js/js_07/index.html

@@ -0,0 +1,32 @@
+<!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>Document</title>
+    <!--<script src="index.js"></script>-->
+    <script>   
+
+
+       </script>
+</head>
+<body>
+    <p>Количество велосипедов: <input type='number' id="bikes" /></p>
+    <p>Категория велосипедов: <input type='number' id="bikesCategory" /></p>
+    <p>Часов арнеды (стоимость 80грн/час): <input type='number' id="timeRent" /></p>
+    <br></br>
+    <p id="result" style = "background: green; padding: 20px 10px; color: white">тут появится цена когда вы заполните все ячейки</p>
+    <script>
+
+    const calcResult = () => {
+            let bikesCost = 80;
+            result.innerHTML = bikes.value * timeRent.value * bikesCost + ' грн'
+        }
+        
+        bikes.oninput = timeRent.oninput = calcResult
+
+
+    </script>
+</body>
+</html>

File diff suppressed because it is too large
+ 535 - 0
js/js_07/index.js