28
rated 0 times
[
31]
[
3]
/ answers: 1 / hits: 17471
/ 10 Years ago, mon, september 15, 2014, 12:00:00
I want to show a warning message if a user selects a specific option, but the warning isn't appearing. How can I modify my code so that this works correctly? Here is a demo on jsFiddle which reproduces the problem?
HTML :
<input type=text id=mail_address/>
<select>
<option value='google.com'>google.com</option>
<option onClick=warningaa() value=''>Don't send mail</option>
</select>
JS:
function warningaa() {
alert('If you choose this option, you can not receive any information');
}
More From » html