<html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>
<script language="JavaScript">
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
divTop = parseInt(document.getElementById("ad_layer").style.top,10)
divLeft = parseInt(document.getElementById("ad_layer").style.left,10)
divHeight = parseInt(document.getElementById("ad_layer").offsetHeight,10)
divWidth = parseInt(document.getElementById("ad_layer").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
document.getElementById("ad_layer").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight
document.getElementById("ad_layer").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth
document.getElementById("ad_layer").style.visibility="visible"
objTimer = window.setInterval("moveDiv()",10)
}
catch(e){}
}function resizeDiv()
{
i+=1
if(i>888) closeDiv()
try{
divHeight = parseInt(document.getElementById("ad_layer").offsetHeight,10)
divWidth = parseInt(document.getElementById("ad_layer").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
document.getElementById("ad_layer").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
document.getElementById("ad_layer").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
}
catch(e){}
}function moveDiv()
{
try
{
if(parseInt(document.getElementById("ad_layer").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer = window.setInterval("resizeDiv()",1)
}
divTop = parseInt(document.getElementById("ad_layer").style.top,10)
document.getElementById("ad_layer").style.top = divTop - 1
}
catch(e){}
}
function closeDiv()
{
document.getElementById('ad_layer').style.visibility='hidden';
if(objTimer) window.clearInterval(objTimer)
}
window.onload = getMsg;
window.onresize = resizeDiv;
window.onerror = function(){}
</script>
<div id="ad_layer" style="background-color:#C9D3F3;position:absolute;top:0px;left:0px;width:180px;height:116px;visibility:hidden;z-index:99999;border-bottom:1px solid #455690;border-right:1px solid #455690;border-top:1px solid #A6B4CF;border-left:1px solid #A6B4CF;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-top:1px solid #FFFFFF;border-left:1px solid #FFFFFF" bgcolor="#CFDEF4">
<tr>
<td height="24" width="42" style="background-image: url(/sports/Images/msgTopBg.gif);color:#0F2C8C;font-size:12.7px" valign="middle" ><img src="/sports/images/male.gif" width="21" height="30" hspace="5" vspace="1" align="absmiddle"></td>
<td style="background-image: url(/sports/Images/msgTopBg.gif);color:#1F336B;font-size:9pt;font-weight:normal;padding-top:4px" valign="middle" width="111">MSN信息框:</td>
<td style="background-image: url(/sports/Images/msgTopBg.gif);padding-top:2px" valign="middle" width="24" align="right"><img src="/sports/images/msgClose.jpg" width="13" height="13" hspace="3" style="cursor:hand" title="关闭" onclick="closeDiv()"></td>
</tr>
<tr>
<td colspan="3" height="90" style="background-image: url(/sports/Images/msgBottomBg.jpg);padding-right:1px;padding-bottom:1px">
<div style="border-left: #728EB8 1px solid;border-top: #728EB8 1px solid;border-right:#B9C9EF 1px solid;border-bottom:#B9C9EF 1px solid;height:100%;width:100%;color:#1F336B;font-size:9pt;padding:13px;padding-top:18px">
<div align="center">哈哈:),有趣! </div>
<div align="center"><a href="#" style="font-weight:bold" onclick="window.open('http://dotnet.aspx.cc/Play.aspx','TopMusic')"></a></div>
</div></td>
</tr>
</table>
</div>
</body>
</html>
<head>
<title>Untitled Document</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head><body>
<script language="JavaScript">
var divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
function getMsg()
{
try{
divTop = parseInt(document.getElementById("ad_layer").style.top,10)
divLeft = parseInt(document.getElementById("ad_layer").style.left,10)
divHeight = parseInt(document.getElementById("ad_layer").offsetHeight,10)
divWidth = parseInt(document.getElementById("ad_layer").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
document.getElementById("ad_layer").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight
document.getElementById("ad_layer").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidth
document.getElementById("ad_layer").style.visibility="visible"
objTimer = window.setInterval("moveDiv()",10)
}
catch(e){}
}function resizeDiv()
{
i+=1
if(i>888) closeDiv()
try{
divHeight = parseInt(document.getElementById("ad_layer").offsetHeight,10)
divWidth = parseInt(document.getElementById("ad_layer").offsetWidth,10)
docWidth = document.body.clientWidth;
docHeight = document.body.clientHeight;
document.getElementById("ad_layer").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)
document.getElementById("ad_layer").style.left = docWidth - divWidth + parseInt(document.body.scrollLeft,10)
}
catch(e){}
}function moveDiv()
{
try
{
if(parseInt(document.getElementById("ad_layer").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
{
window.clearInterval(objTimer)
objTimer = window.setInterval("resizeDiv()",1)
}
divTop = parseInt(document.getElementById("ad_layer").style.top,10)
document.getElementById("ad_layer").style.top = divTop - 1
}
catch(e){}
}
function closeDiv()
{
document.getElementById('ad_layer').style.visibility='hidden';
if(objTimer) window.clearInterval(objTimer)
}
window.onload = getMsg;
window.onresize = resizeDiv;
window.onerror = function(){}
</script>
<div id="ad_layer" style="background-color:#C9D3F3;position:absolute;top:0px;left:0px;width:180px;height:116px;visibility:hidden;z-index:99999;border-bottom:1px solid #455690;border-right:1px solid #455690;border-top:1px solid #A6B4CF;border-left:1px solid #A6B4CF;">
<table width="100%" border="0" cellpadding="0" cellspacing="0" style="border-top:1px solid #FFFFFF;border-left:1px solid #FFFFFF" bgcolor="#CFDEF4">
<tr>
<td height="24" width="42" style="background-image: url(/sports/Images/msgTopBg.gif);color:#0F2C8C;font-size:12.7px" valign="middle" ><img src="/sports/images/male.gif" width="21" height="30" hspace="5" vspace="1" align="absmiddle"></td>
<td style="background-image: url(/sports/Images/msgTopBg.gif);color:#1F336B;font-size:9pt;font-weight:normal;padding-top:4px" valign="middle" width="111">MSN信息框:</td>
<td style="background-image: url(/sports/Images/msgTopBg.gif);padding-top:2px" valign="middle" width="24" align="right"><img src="/sports/images/msgClose.jpg" width="13" height="13" hspace="3" style="cursor:hand" title="关闭" onclick="closeDiv()"></td>
</tr>
<tr>
<td colspan="3" height="90" style="background-image: url(/sports/Images/msgBottomBg.jpg);padding-right:1px;padding-bottom:1px">
<div style="border-left: #728EB8 1px solid;border-top: #728EB8 1px solid;border-right:#B9C9EF 1px solid;border-bottom:#B9C9EF 1px solid;height:100%;width:100%;color:#1F336B;font-size:9pt;padding:13px;padding-top:18px">
<div align="center">哈哈:),有趣! </div>
<div align="center"><a href="#" style="font-weight:bold" onclick="window.open('http://dotnet.aspx.cc/Play.aspx','TopMusic')"></a></div>
</div></td>
</tr>
</table>
</div>
</body>
</html>
window.status = "你的提示信息, 这样又可以看到信息, 又不打断你的工作了"
而又面临这样的问题:我那个隐藏的刷新页面是1.5秒一刷新,也就是说如果1.5秒内有某用户在前台疯狂的执行了一个操作,那么后台刷新页面就会把该用户的ID变成一个session变量,而刚才的那个窗口就会通过刷新取得session从而读值出来。因为要同步所以在隐藏刷新页面中在执行了变化session变量操作后就会去刷新那个窗口,显然1.5秒的时间太快了,而以前用弹出窗口的话就很好,因为1.5秒弹出一个窗口至少每条数据都会看到,因为设置的是3秒关闭。而改成现在的样子,有时候就会来不及看数据,数据就已经变成下一轮数据了。