0

How to display an alert when the mouse pointer is over the div tag

javasript

27th Aug 2020, 5:28 PM
Jimoh Abdulqudus
4 Answers
+ 1
Use the event On mouse over! var a = document.get blablabla... a.addEventListener("mouseover", function(){a.innerHTML += "you hovered <br>"}); Wanna see an example?
27th Aug 2020, 5:39 PM
Namit Jain
Namit Jain - avatar
27th Aug 2020, 6:00 PM
Namit Jain
Namit Jain - avatar
0
Yes
27th Aug 2020, 5:46 PM
Jimoh Abdulqudus
0
Jimoh Abdulqudus const div = document.getElementById(divId) div.addEventListener("mouseover", () => { alert(alertMsg) })
27th Aug 2020, 6:21 PM
Qui-Gon Jinn
Qui-Gon Jinn - avatar