Browse posteets
About
Contact us
Log In
Register
View: onClick event on
does not fire in Internet Explorer
onClick event on <option> does not fire in Internet Explorer
9 months ago
by
spirit
Remove the events from the options, use an event directly on the select instead.
function myfunc(value) {
alert(value);
}
...
<select
onchange
=
"myfunc(this.options[this.selectedIndex].value)"
>
<option
value
=
"1"
>
Item1
</option>
<option
value
=
"2"
>
Item2
</option>
</select>
ie
javascript
onclick
select
View source
0 comment
about "onClick event on <option> does not fire in Internet Explorer"
Tags
ie
javascript
onclick
select
0 comment about "onClick event on <option> does not fire in Internet Explorer"