diff --git a/javascript/building-blocks/simple-else-if.html b/javascript/building-blocks/simple-else-if.html index 41364746c..6a29a0e95 100644 --- a/javascript/building-blocks/simple-else-if.html +++ b/javascript/building-blocks/simple-else-if.html @@ -21,7 +21,7 @@ const select = document.querySelector('select'); const para = document.querySelector('p'); - select.onchange = setWeather; + select.addEventListener("change", setWeather); function setWeather() { const choice = select.value;