How would i go about alerting the user after they click the submit button to choose an option from the select boxes other than the default value using javascript here’s my code
<select id = "Sel">
<option value ="Song1">default value<br>
<option value ="Song2">Break on through<br>
<option value ="Song3">Time<br>
<option value ="Song4">Money<br>
<option value="Song5">Saucerful of Secrets
</select><br><br>
heres my javascript code im not sure where to start, but this doesnt run
if(document.getElementByID("Sel").value = "default value")
{
alert("Pick another option besides default value");
}
Thanks!
first of all, you markup is not correct.. correct it as
then on form submit check as
OR