Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis+ 4
How can use hover in JavaScript?
i wanna say while using style like that (a.style.color="red") how can i add hover in JavaScript file please help.šš
8 Respostas
+ 21
helloo
+ 4
It's called onmouseover event
+ 3
You need to use onmouseleave event to get the default styling back
+ 3
Well, if you just want to add a different color when hovering a link, just use the :hover selector to your CSS:
a:hover {
color: red;
}
Javascript on hover event is used to fire events, such as
<a href=ājavascript:void(null);ā onmouseover=ājavascript:myFunction();ā>Hover me</a>
But itās used mainly in different elements, such as divs, tr, etc..
+ 1
ššš Luigi thanks alot pal.
+ 1
No problem! š
0
thanks alot Toni Isotalo i will try to do it.āŗ
0
Nina Hendra Putri hello