-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathEjercicio 7.html
More file actions
36 lines (28 loc) · 768 Bytes
/
Ejercicio 7.html
File metadata and controls
36 lines (28 loc) · 768 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
<!DOCTYPE html>
<html lang=en dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
<script>
function operacion(op) {
var ope;
if (op == "n1") {
ope = document.getElementById("n1").value;
} else {
ope = (document.getElementById("n2").value;
}
</script>
</head>
<body>
<p>Introduce numeros para realizar una operación:</p>
<input id="n1" onkeyup="numero1('n1')">
<select name="operador">
<option value="suma">+</option>
<option value="resta">-</option>
<option value="multiplicacion">*</option>
<option value="division">/</option>
</select>
<input id="n2" onkeyup="numero2('n2')">
<p><input id="resultado" onkeyup="resultado('r')"> Resultado</p>
</body>
</html>