Browse Source

DOM: база

Vladislav342 2 years ago
parent
commit
6692b04105
1 changed files with 7 additions and 6 deletions
  1. 7 6
      HW_06/index.html

+ 7 - 6
HW_06/index.html

@@ -64,7 +64,8 @@
 	<input type="number" id="num1" placeholder="number 1">
    	<input type="number" id="num2" placeholder="number 2">
    	<button id="plus">Sum</button>
-   	<input type="number" id='result'>
+   	<input type="number" id='result' oninput="calc()">
+
 
 	<script>
 
@@ -219,15 +220,15 @@
 			result.value=(+num1.value)+(+num2.value);
 		}
 
-		// ??????????
-
-		//input1.oninput = calc;
-		//input2.oninput = calc;
+		num1.oninput = calc;
+		num2.oninput = calc;
 		
 
-
+		//button уже не нужен
 
 
 	</script>
+	
+	
 </body>
 </html>