diff --git a/Practicas/Practicas JS/DOM Alquiler Coche V2/Ejercicio_practica_alquila_coche2.html b/Practicas/Practicas JS/DOM Alquiler Coche V2/Ejercicio_practica_alquila_coche2.html new file mode 100644 index 0000000..12f7d80 --- /dev/null +++ b/Practicas/Practicas JS/DOM Alquiler Coche V2/Ejercicio_practica_alquila_coche2.html @@ -0,0 +1,179 @@ + + + + + Coste viaje JAVASCRIPT + + + + + +
+
+

Alquiler de vehículo

+ +

Elige la fecha de inicio del alquiler

+

Elige la fecha de fin del alquiler

+
+

Seleccione el tipo de vehículo + +

+

Elementos opcionales

+

Silla Infantil * 15 Euros por día de alquiler

+

GPS * 5 Euros por día de alquiler

+

Seguro

+

** El seguro a terceros es obligatorio y tiene un coste de 10 Euros/día sin IVA

+

Seguro a todo riesgo

+

Conductor menor de 30 años

+

Coste total

+ + + +

+ + + +
+ + + + +
+ + +
+ + + \ No newline at end of file diff --git a/Practicas/Practicas JS/DOM Alquiler Coche V2/index_con_js.html b/Practicas/Practicas JS/DOM Alquiler Coche V2/index_con_js.html index 4de7abb..8777040 100644 --- a/Practicas/Practicas JS/DOM Alquiler Coche V2/index_con_js.html +++ b/Practicas/Practicas JS/DOM Alquiler Coche V2/index_con_js.html @@ -217,9 +217,13 @@ const index = opciones.indexOf(opc); return index !== -1 ? valores[index] : valorDefecto; } + + function totalXOpcion(checked, valorChecked, valorUnchecked) { return checked ? valorChecked : valorUnchecked; } + + function submitForm() { document.getElementById("formAlquiler").submit(); }