js:
<script type="text/javascript" language="javascript"> function message(event) { var event = event || window.event; document.getElementById("tipsss").style.display = 'block'; document.getElementById("tipsss").style.left = event.clientX+10;; document.getElementById("tipsss").style.top = event.clientY + 5; ; document.getElementById("tipsss").innerHTML = ' 这里是详细内容啊'; } var closemessage = function (event) { document.getElementById("tipsss").style.display = 'none';
} </script>
页面元素:
<form id="Form2" runat="server">
<div id="tipsss" style="display:none;width:100;height:100;background:#c0ffc0;position :absolute; border:1px"></div>
<a href="#" onmouseover="message(event)" onmouseout="closemessage(event)">什么问题啊,不知道你说的啥,把问题说清楚</a>
<br>
<a href="#" onmouseover="message(event)" onmouseout="closemessage(event)">新疆</a>
自己解决了