cat m2.js
function popMenu(event){
var mymenu = document.getElementById("menu-div");
mymenu.style.left = event.clientX + "px";
mymenu.style.top = event.clientY + "px";
mymenu.style.display = "block";
return false;
}
cat m2.css
-sharpmenu-div{
width:140px;
height:200px;
background-color:-sharp00beff;
position:fixed;
display:none;
border:2px solid red;
}
li{
margin-left:-10px;
line-height:35px;
}
html Code
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title></title>
<link rel="stylesheet" href="m2.css">
<script src="m2.js"></script>
</head>
<body>
<p onmouseover="popMenu();">
<div id="menu-div">
<ul>
<li>1</li>
<li>2</li>
<li>3</li>
<li>4</li>
<li>5</li>
</ul>
</div>
</body>
</html>
Why is there no menu pop-up when the mouse is over the word Hello?
how do I modify it?