慢慢上升的图片
1
<script language="javascript">
2
window.onload = getToday;
3
window.onresize = resizeDiv;
4
window.onerror = function(){}
5
//提示
6
var request,divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;
7
function getToday()
8
{
9
if (window.XMLHttpRequest)
10
{
11
request = new XMLHttpRequest();
12
}
13
else if (window.ActiveXObject)
14
{
15
request = new ActiveXObject("Microsoft.XMLHTTP");
16
}
17
if (request)
18
{
19
// Retrieve the information for the new rows
20
21
request.onreadystatechange = ReceiveDate;
22
request.open("POST", "GetDate.aspx", true);
23
request.send(null);
24
}
25
26
}
27
function ReceiveDate(e)
28
{
29
if (request.readyState == 4 && request.status == 200)
30
{
31
isMonthEnd = request.responseText;
32
if (isMonthEnd != "False")
33
{
34
getMsg();
35
}
36
else
37
{
38
}
39
}
40
}
41
function getMsg()
42
{
43
try{
44
divTop = parseInt(document.getElementById("eMeng").style.top,10)
45
divLeft = parseInt(document.getElementById("eMeng").style.left,10)
46
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
47
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
48
docWidth = document.body.clientWidth;
49
docHeight = document.body.clientHeight;
50
document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight
51
document.getElementById("eMeng").style.left = 0//parseInt(document.body.scrollLeft,10) + docWidth - divWidth
52
document.getElementById("eMeng").style.visibility="visible"
53
objTimer = window.setInterval("moveDiv()",10)
54
}
55
catch(e){}
56
}
57
58
function resizeDiv()
59
{
60
i+=1
61
if(i>500) closeDiv()
62
try{
63
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)
64
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)
65
docWidth = document.body.clientWidth;
66
docHeight = document.body.clientHeight;
67
document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)-30
68
document.getElementById("eMeng").style.left = 0//docWidth - divWidth + parseInt(document.body.scrollLeft,10)
69
}
70
catch(e){}
71
}
72
73
function moveDiv()
74
{
75
try
76
{
77
if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))
78
{
79
window.clearInterval(objTimer)
80
objTimer = window.setInterval("resizeDiv()",1)
81
}
82
divTop = parseInt(document.getElementById("eMeng").style.top,10)
83
document.getElementById("eMeng").style.top = divTop - 1
84
}
85
catch(e){}
86
}
87
function closeDiv()
88
{
89
document.getElementById('eMeng').style.visibility='hidden';
90
if(objTimer) window.clearInterval(objTimer)
91
}
92
</script>
html:
<script language="javascript">2
window.onload = getToday;3
window.onresize = resizeDiv;4
window.onerror = function(){}5
//提示6
var request,divTop,divLeft,divWidth,divHeight,docHeight,docWidth,objTimer,i = 0;7
function getToday()8
{9
if (window.XMLHttpRequest)10
{11
request = new XMLHttpRequest();12
}13
else if (window.ActiveXObject)14
{15
request = new ActiveXObject("Microsoft.XMLHTTP");16
}17
if (request)18
{19
// Retrieve the information for the new rows20
21
request.onreadystatechange = ReceiveDate;22
request.open("POST", "GetDate.aspx", true);23
request.send(null);24
}25
26
}27
function ReceiveDate(e)28
{29
if (request.readyState == 4 && request.status == 200)30
{31
isMonthEnd = request.responseText;32
if (isMonthEnd != "False")33
{ 34
getMsg();35
}36
else37
{38
}39
}40
}41
function getMsg()42
{43
try{44
divTop = parseInt(document.getElementById("eMeng").style.top,10)45
divLeft = parseInt(document.getElementById("eMeng").style.left,10)46
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)47
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)48
docWidth = document.body.clientWidth;49
docHeight = document.body.clientHeight;50
document.getElementById("eMeng").style.top = parseInt(document.body.scrollTop,10) + docHeight + 10;// divHeight51
document.getElementById("eMeng").style.left = 0//parseInt(document.body.scrollLeft,10) + docWidth - divWidth52
document.getElementById("eMeng").style.visibility="visible"53
objTimer = window.setInterval("moveDiv()",10)54
}55
catch(e){}56
}57

58
function resizeDiv()59
{60
i+=161
if(i>500) closeDiv()62
try{63
divHeight = parseInt(document.getElementById("eMeng").offsetHeight,10)64
divWidth = parseInt(document.getElementById("eMeng").offsetWidth,10)65
docWidth = document.body.clientWidth;66
docHeight = document.body.clientHeight;67
document.getElementById("eMeng").style.top = docHeight - divHeight + parseInt(document.body.scrollTop,10)-3068
document.getElementById("eMeng").style.left = 0//docWidth - divWidth + parseInt(document.body.scrollLeft,10)69
}70
catch(e){}71
}72

73
function moveDiv()74
{75
try76
{77
if(parseInt(document.getElementById("eMeng").style.top,10) <= (docHeight - divHeight + parseInt(document.body.scrollTop,10)))78
{79
window.clearInterval(objTimer)80
objTimer = window.setInterval("resizeDiv()",1)81
}82
divTop = parseInt(document.getElementById("eMeng").style.top,10)83
document.getElementById("eMeng").style.top = divTop - 184
}85
catch(e){}86
}87
function closeDiv()88
{89
document.getElementById('eMeng').style.visibility='hidden';90
if(objTimer) window.clearInterval(objTimer)91
}92
</script>
<DIV id="eMeng" style="BORDER-RIGHT: #455690 1px solid; BORDER-TOP: #a6b4cf 1px solid; Z-INDEX: 99999; LEFT: 4px; VISIBILITY: hidden; BORDER-LEFT: #a6b4cf 1px solid; WIDTH: 50; BORDER-BOTTOM: #455690 1px solid; POSITION: absolute; TOP: 6px; HEIGHT: 116px; BACKGROUND-COLOR: #addee0">
<TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" cellSpacing="0"
cellPadding="0" width="40" bgColor="#FFCC99" border="0">
<TBODY>
<TR>
<TD style="FONT-SIZE: 12px; COLOR: #0f2c8c" width="1" height="24"></TD>
<TD style="PADDING-LEFT: 4px; FONT-WEIGHT: normal; FONT-SIZE: 12px; COLOR: #1f336b; PADDING-TOP: 4px"
vAlign="center">消息提醒:</TD>
<TD style="PADDING-RIGHT: 2px; PADDING-TOP: 2px" vAlign="center" align="right" width="12"><SPAN title="关闭" style="FONT-WEIGHT: bold; FONT-SIZE: 12px; CURSOR: hand; COLOR: red; MARGIN-RIGHT: 4px"
onclick="closeDiv()">×</SPAN></TD>
</TR>
<TR>
<TD style="PADDING-RIGHT: 1px; PADDING-BOTTOM: 1px" width="100%" colSpan="3" height="90"
nowrap="true">
<DIV style="BORDER-RIGHT: #b9c9ef 1px solid; PADDING-RIGHT: 13px; BORDER-TOP: #728eb8 1px solid; PADDING-LEFT: 13px; FONT-SIZE: 12px; PADDING-BOTTOM: 13px; BORDER-LEFT: #728eb8 1px solid; WIDTH: 100%; COLOR: #1f336b; PADDING-TOP: 18px; BORDER-BOTTOM: #b9c9ef 1px solid; HEIGHT: 100%">
************************<br>
请查看订单是否全部确认,<br>
如果没有确认,请尽快确认,<br>
今天可是最后一天哦!
</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
private void Page_Load(object sender, System.EventArgs e)
{
Invent.TPO.DataAccess.Calendar calendar = new Invent.TPO.DataAccess.Calendar();
bool isMonthEnd = calendar.IsMonthEnd();
Response.Write(isMonthEnd.ToString());
Response.End();
}
window.onerror 
浙公网安备 33010602011771号