3
Is there any way when you have with a combobox open run a script?
3
Is there any way when you have with a combobox open run a script?
3
The event of click
you can implement as follows:
document.getElementById("combobox").addEventListener("click", eventoClick);
function eventoClick() {
alert("teste do onclick")
}
There is also the event of change
which is when the combobox options are toggled:
document.getElementById("combobox").addEventListener("change", eventoClick);
function eventoChange(){
alert("teste do change")
}
And also the mouseover
:
document.getElementById("combobox").addEventListener("mouseover", eventoMouseOver);
function eventoMouseOver() {
alert("teste do mouseover")
}
Follows the jsfiddle
Thanks :), there is also some way when you go over option run also another script?
$("select option").hover(function() {
 alert("ola");
 });
I did so but this not to give.
I updated the post and jsfiddle =D
Browser other questions tagged javascript
You are not signed in. Login or sign up in order to post.
if that’s what I wanted.
– Thepeter
you can use the click event for this, http://jsfiddle.net/4fLb5bqo/
– Gabriel Rodrigues