HTML CSS JavaScript Demo: Radio Buttons -- Version 2

Publicado el: 14 enero 2022
en el canal de: Thomas Blum
75
0

In this video we take a second look at an HTML web page with a set of radio buttons (inputs of type radio). One change from the previous version is that we placed the JavaScript into a separate file that we connect to at the bottom of the HTML page with a script tag. We used addEventListener to connect code to the click events of the button and the radio buttons. We looped over the radio-button options using the forEach method connected to arrays. Instead of looping over radio buttons and asking which one was checked, we use the document.querySelector approach and looked for something in the checked state. input[name="radSize"]:checked We put that in a try-catch block in case the user had not selected a size.


En esta página del sitio puede ver el video en línea HTML CSS JavaScript Demo: Radio Buttons -- Version 2 de Duración hora minuto segunda en buena calidad , que subió el usuario Thomas Blum 14 enero 2022, comparta el enlace con amigos y conocidos, en youtube este video ya ha sido visto 75 veces y le gustó 0 a los espectadores. Disfruta viendo!