现在的位置: 首页 > 综合 > 正文

鼠标移上去之后,显示提示信息

2013年10月02日 ⁄ 综合 ⁄ 共 1455字 ⁄ 字号 评论关闭

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
</head>
<body>
    <span onmousemove="MessageShow()" onmouseout="Disappear()">123123123</span>
    <div id="Message" style="display: none; position: absolute; top: 30px 100px; width: 100px;
        height: 100px; background: #ff0000; color: #ffffff;">
        123
    </div>
</body>

    <script language="javascript">
        var tx;
        var ty;
        var message = document.getElementById("Message");
        function MessageShow(e) {
            message.style.display = "block";
            if (!e)
                e = window.event;
            if (e.pageX) {
                tx = e.pageX;
                ty = e.pageY;
            }
            if (e.clientX) {
                tx = e.clientX; ty = e.clientY;
            }
            message.style.left = tx + 10 + "px";
            message.style.top = ty + 10 + "px";
        }
        function Disappear() {
            message.style.display = "none";
        }
        function showmessgae() {
            message.style.display = "block";
        }
    </script>

</html>

 

--=====================================

 

ScriptManager.RegisterStartupScript(Page, this.GetType(), "DoSearch", "DoSearch()", true);
ClientScript.RegisterStartupScript(this.GetType(), "DoSearch", "DoSearch()");
Page.RegisterStartupScript("DoSearch", "DoSearch()");
ScriptManager.RegisterClientScriptInclude(this, this.GetType(), "Jqurey", "script/jquery-1.3.2-vsdoc-CN.js");

【上篇】
【下篇】

抱歉!评论已关闭.