(1)<head></head>加入
<script type="text/javascript" language="javascript">
function showTip(oEvent)
{
var oDiv=document.getElementById("divTip1");
oDiv.style.visibility="visible";
oDiv.style.left=oEvent.clientX+5;
oDiv.style.top=oEvent.clientY+5;
}
function hideTip(oEvent)
{
var oDiv=document.getElementById("divTip1");
oDiv.style.visibility="hidden";
}
</script>
(2)<body></body>加入
<input id="Text1" type="text" οnmοuseοver="showTip(event)" οnmοuseοut="hideTip(event)"/>
<div id="divTip1" style="background-color:Yellow; position:absolute; visibility:hidden; padding:5px; width:150px;">
<span style="font-weight:bold"><font color="red">你好,请输入</font></span>
</div>
本文来自CSDN博客,转载请标明出处:http://blog.csdn.net/lovexiaoxiao/archive/2009/02/09/3870624.aspx