<Script language="javascript">
document.write('<DIV id=eMeng style="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX:99999; LEFT: 120px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 265px; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 100px; HEIGHT: 255px; BACKGROUND-COLOR: #c9d3f3"><span title=关闭 style="CURSOR: hand;color:white;font-size:12px;font-weight:bold;margin-right:4px;" style="CURSOR: hand;color:white;font-size:12px;font-weight:bold;margin-right:4px;" onclick=disDiv() >×</span><span title=关闭 style="CURSOR: hand;color:white;font-size:12px;font-weight:bold;margin-right:4px;" style="CURSOR: hand;color:white;font-size:12px;font-weight:bold;margin-right:4px;" onclick=appDiv() >开</span></div>');

<!--
window.onload = getMsg;
window.onresize = resizeDiv;
window.onerror = function(){}
//短信提示使用(asilas添加)
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
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>1300) 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 disDiv()
{
document.getElementById("eMeng").style.top=docHeight+parseInt(document.body.scrollTop,10);
document.getElementById("eMeng").style.height="12px";
}
function appDiv()
{
document.getElementById("eMeng").style.height="255px";
document.getElementById("eMeng").style.top=docHeight-divHeight+parseInt(document.body.scrollTop,10);

}

function closeDiv()
{
document.getElementById('eMeng').innerHTML='';
//document.getElementById('eMeng').style.visibility='hidden';
document.getElementById('eMeng').style.height="12px";
if(objTimer) window.clearInterval(objTimer)
}
-->
</Script>

posted on 2009-12-17 18:14 sanmao 阅读(78) 评论(0)  编辑  收藏

只有注册用户登录后才能发表评论。


网站导航:
 

常用链接

留言簿(5)

随笔分类

随笔档案

搜索

  •  

最新评论

阅读排行榜

评论排行榜