-
-
Save parzibyte/90f6bd8ca09451e110e5fce171d6d7f7 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mostrar = () => { | |
const indice = $select.selectedIndex; | |
if(indice === -1) return; // Esto es cuando no hay elementos | |
const opcionSeleccionada = $select.options[indice]; | |
alert(`Texto: ${opcionSeleccionada.text}. Valor: ${opcionSeleccionada.value}`); | |
}; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment