Answer the question
In order to leave comments, you need to log in
Why does this JS code only work in Mozilla FireFox?
Can you please tell me why this "code" works correctly only in the Mozilla FireFox browser? There are no errors in the console. Thanks in advance!
Answer the question
In order to leave comments, you need to log in
Old bug
doesn't work onclick on option in Chrome
Simple example:
<select>
<option onclick="check()">one</option>
<option onclick="check()">two</option>
<option onclick="check()">three</option>
</select>
<script>
function check() {
alert('check')
}
</script>
As already mentioned above, it is better to never hang events on option, because the select can be styled by any plugin and it will stop working. Therefore, track the onchange of the select
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question