-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathSalguero_unidad1
121 lines (105 loc) · 3.39 KB
/
Salguero_unidad1
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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
<!DOCTYPE html>
<html lang="es">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Solicitar Contacto</title>
<style>
body {
font-family: Arial, sans-serif;
background-color: #f0f0f0;
margin: 0;
padding: 0;
display: flex;
justify-content: center;
align-items: center;
height: 100vh;
}
.container {
background-color: #fff;
border-radius: 10px;
box-shadow: 0 0 15px rgba(0, 0, 0, 0.2);
padding: 70px;
width: 25%; /* Establecer el ancho del contenedor principal */
display: flex;
flex-direction: column; /* Alineación vertical */
margin: 0 auto; /* Centrar horizontalmente */
}
h1 {
text-align: center;
}
label {
display: block;
margin: 10px 0;
}
input, select {
width: 95%;
padding: 10px;
border: 1px solid #ccc;
border-radius: 5px;
}
select {
width: 100%;
}
.total-cost {
font-weight: bold;
margin-top: 10px;
}
button {
width: 100%;
padding: 10px;
background-color: #007BFF;
color: #fff;
border: none;
border-radius: 15px;
cursor: pointer;
}
</style>
</head>
<body>
<div class="container">
<h1>Solicitar Contacto</h1>
<form>
<label for="nombre">Nombre</label>
<input type="text" id="nombre" name="nombre" required>
<label for="apellido">Apellido</label>
<input type="text" id="apellido" name="apellido" required>
<label for="dni">DNI</label>
<input type="text" id="dni" name="dni" required>
<label for="email">Email</label>
<input type="email" id="email" name="email" required>
<label for="telefono">Teléfono</label>
<input type="tel" id="telefono" name="telefono" required>
<label for="tipoSeguro">Tipo de Seguro</label>
<select id="tipoSeguro" name="tipoSeguro">
<option value="basico">Básico</option>
<option value="intermedio">Intermedio</option>
<option value="premium">Premium</option>
</select>
<div class="total-cost">
Costo del seguro: <span id="costoSeguro">$500</span>
</div>
<button type="submit">Solicitar Contacto</button>
</form>
</div>
<script>
const tipoSeguro = document.getElementById("tipoSeguro");
const costoSeguro = document.getElementById("costoSeguro");
tipoSeguro.addEventListener("change", () => {
switch (tipoSeguro.value) {
case "basico":
costoSeguro.textContent = "$500";
break;
case "intermedio":
costoSeguro.textContent = "$1000";
break;
case "premium":
costoSeguro.textContent = "$1500";
break;
default:
costoSeguro.textContent = "";
}
});
</script>
</body>
</html>