I want to execute a function depending on which option in a dropdown menu is selected. For now I just wrote document.write() function to test if anything is happening.
However, nothing is printing, and the code is not working as I wanted.
<h>Would you like to see count values per hour or minute?</h><br>
<Select id="Selector">
<option value="hr">Hour</option>
<option value="min">Minute</option>
</Select>
<script>
if (document.getElementById('Selector').value == "min") {
document.write("Hello World!");
}
</script>