convertir código a angular
Publicado por sam (1 intervención) el 22/09/2019 09:06:19
convertir código a angular?
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
37
38
39
40
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta title="habilitar, deshabilitar combos según selección en un radio button">
<script>
function habilitar(value) {
if (value == "1") {
// habilitamos
document.getElementById("segundo").disabled = false;
document.getElementById("tres").disabled = true;
} else if (value == "2") {
// deshabilitamos
document.getElementById("segundo").disabled = true;
document.getElementById("tres").disabled = false;
}
}
</script>
</head>
<body>
<form>
<div>
<input type="radio" value="1" name="habilitarDeshabilitar" onclick="habilitar(this.value);"> HOla1
<input type="text" name="segundo" id="segundo" disabled>
<input type="radio" value="2" name="habilitarDeshabilitar" onclick="habilitar(this.value);"> Hola2
<input type="text" name="tres" id="tres" disabled>
</div>
</form>
</body>
</html>
Valora esta pregunta


0