问题描述:

i have several select Elements (they are empty because they get populated using javascript). They are looking something like this:

<div id="dropdown_plug1" class="dropdown">

<p>Linker Stecker</p>

<select id="plug1" onchange='getInclusions(this);'>

</select>

</div>

I am using Firefox (Version 25) and having issues with the onchange event:

The User moves the mouse over the options of the select element but does not click on one of it. When moving out of the select element and clicking some other element, the onchange element gets fired.

If there's already a solution for this on stackoverflow please show me, because i spent several hours searching for a solution.

TL;DR: onchange event gets fired even when there was no click on an option, only mouseover.

What am I doing wrong? Any help is greatly appreciated!

网友答案:

I have tried your code on firefox on my system and its working fine. There could be following reasons for this issue
1. There could be other code who makes it bind onmouseover event with this dropdown for this you can use unbind() function to unbind the event.
2. There could be some skin applied on this control if you are using ASP.net

相关阅读:
Top