zoukankan      html  css  js  c++  java
  • MSN窗口提示

    MSN窗口提示
    调用方法
    javascript:getMsg("&nbsp;MaxIE提醒您","&nbsp;&nbsp;<a style=cursor:hand href=# onclick=\"javascript:open('messanger.asp','','width=500,height=400')\">消息!</a>");</script>

    document.writeln("<div id=\"eMeng\" style=\"BORDER-RIGHT:#455690 1px solid; BORDER-TOP:#a6b4cf 1px solid; Z-INDEX:99999; LEFT:0px; VISIBILITY:hidden; BORDER-LEFT:#a6b4cf 1px solid; WIDTH:180px; BORDER-BOTTOM:#455690 1px solid; POSITION:absolute; TOP:0px; BACKGROUND-COLOR:#c9d3f3\">");
    document.writeln("<table width=\"100%\" border=0 cellpadding=0 cellspacing=0>");
    document.writeln("<tr class=a1>");
    document.writeln("<td height=\"23\" valign=\"middle\"><span id=\"MsgTitle\"></span></td>");
    document.writeln("<td valign=\"middle\" align=\"right\" class=a2>");
    document.writeln("<img src=\"img/msgClose.jpg\" hspace=\"3\" style=\"CURSOR:pointer\" onclick=\"closeDiv()\" title=\"关闭\"></td>");
    document.writeln("</tr>");
    document.writeln("<tr>");
    document.writeln("<td colspan=\"2\" height=60 class=a3>");
    document.writeln("<div>");
    document.writeln("<span id=\"MsgCenter\"></span></div>");
    document.writeln("</td>");
    document.writeln("</tr>");
    document.writeln("</table>");
    document.writeln("</div>");

    var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
    function getMsg(MM1,MM2)
    {
    try{
    MsgTitle.innerHTML=MM1;//小窗口标题。
    MsgCenter.innerHTML=MM2;//小窗口内容。

    divTop = parseInt(document.getElementById("eMeng").style.top,10)
    divLeft = parseInt(document.getElementById("eMeng").style.left,10)
    divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
    divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
    docWidth = document.body.clientWidth;
    docHeight = document.body.clientHeight;
    document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;//  divHeight
    document.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth
    document.getElementById("eMeng").style.visibility="visible"
    objTimer = window.setInterval("moveDiv()",10)
    }
    catch(e){}
    }

    function resizeDiv()
    {
    i+=1
    if(i>1288) closeDiv()
    try{
    divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
    divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
    docWidth = document.body.clientWidth;
    docHeight = document.body.clientHeight;
    document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
    document.getElementById("eMeng").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
    }
    catch(e){}
    }

    function moveDiv()
    {
    try
    {
    if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
    {
    window.clearInterval(objTimer)
    objTimer = window.setInterval("resizeDiv()",1)
    }
    divTop = parseInt(document.getElementById("eMeng").style.top,10)
    document.getElementById("eMeng").style.top = divTop - 1
    }
    catch(e){}
    }
    function closeDiv()
    {
    document.getElementById('eMeng').style.visibility='hidden';
    if(objTimer) window.clearInterval(objTimer)
    }

    setTimeout('closeDiv()',10000);//几秒后自动关闭

  • 相关阅读:
    spark 随机森林算法案例实战
    AngularJS 下拉列表demo
    机器学习案例学习【每周一例】之 Titanic: Machine Learning from Disaster
    sklearn中的数据预处理----good!! 标准化 归一化 在何时使用
    kaggle 中使用ipython
    机器学习中的数据不平衡问题----通过随机采样比例大的类别使得训练集中大类的个数与小类相当,或者模型中加入惩罚项
    机器学习 数据量不足问题----1 做好特征工程 2 不要用太多的特征 3 做好交叉验证 使用线性svm
    [029] 微信公众帐号开发教程第5篇-各种消息的接收与响应(转)
    [028] 微信公众帐号开发教程第4篇-消息及消息处理工具的封装(转)
    微信公众帐号开发教程第3篇-开发模式启用及接口配置(转)
  • 原文地址:https://www.cnblogs.com/MaxIE/p/302563.html
Copyright © 2011-2022 走看看