0
How to display an alert when the mouse pointer is over the div tag
javasript
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?
0
Yes
0
Jimoh Abdulqudus
const div = document.getElementById(divId)
div.addEventListener("mouseover", () => {
alert(alertMsg)
})