You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
<p><strong>Ejercicio: </strong> <br>Confeccionar una página que muestre tres checkbox que permitan seleccionar los deportes que practica el usuario (Fútbol, Básket, Tenis) Mostrar al presionar un botón los deportes que eligió. </p>
<hr>
<script>
function imprimirDeportes () {
var futbol = document.getElementById('futbol');
var basket = document.getElementById('basket');
var tenis = document.getElementById('tenis');
var deportes = '';
if (futbol.checked){
deportes = deportes +'futbol';
}
if (basket.checked){
deportes = deportes +' basket';
}
if (tenis.checked){
deportes = deportes +' tenis';
}
alert('Los deportes que te gustan son: ' + deportes);