各位高手,该出场了~~~~~~~~~~~~~~ ~~~~~另外再求自认为风格,色彩配制比较好的datagrid,请把<asp:datagrid...............>省略号中的内容贴在这里 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 我觉得MYIE那种应该就是你想要的吧。。不妨参考一下。 1.Web页面最小化后变系统托盘没见过。2.弹出及时消息页面:A.aspx:private void Button1_Click(object sender, System.EventArgs e){string strscript="<script language='javascript'>";strscript+="window.open('ss.htm','_blank','width=300,height=200,left=1000,top=1000');";strscript+="</script>";Response.Write(strscript);}//弹出小窗口ss.htm:<HTML> <HEAD><title>PopupMessage</title><meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1"> <meta name="CODE_LANGUAGE" Content="C#"> <META http-equiv="Content-Type" charset='gb2312"'> <meta name="vs_defaultClientScript" content="JavaScript"> <meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5"> <SCRIPT language="JAVASCRIPT"> var originX=screen.width-250; var originY=screen.height; var timeID; function onload() { mystart(); } function raiseup(step) { if(originY>450) { originY=originY-step; window.moveTo(originX-10,originY); } } function mystart() { timeID = setInterval('raiseup(10)',10); } </SCRIPT></HEAD> <body MS_POSITIONING="GridLayout" leftmargin=0 topmargin=0 onload="onload()"> <table border="0" cellpadding="0" cellspacing="0" width="100%" align=left> <tr width="100%"> <td align=left valign=top> hi,you have a message! </td> </tr> </table> </body></HTML> 楼上的兄弟谢谢,不过这不是我想要的,我再把我的意思说详细点.一个网上审批流程,业务员填的单子需要供销处长审批,但是供销处长不可能一天呆在那里等单子.他作其他事情,把本页面最小化,页面定时自动刷新(这个我会),当检测到有新单子,最小化网页闪烁(这个我不会)或者出现faxmail那样提示(我也不会),供销处长再打开本web进行审批. 这个不行 最小化托盘那个IE做不到除非你用windows程序 用B/S肯定不行 ~~~~~另外再求自认为风格,色彩配制比较好的datagrid,请把<asp:datagrid...............>省略号中的内容贴在这里:/*************************************************************************************//****************************** styles.css ***********************************//*************************************************************************************/...... .......grid-header a:active{ color: #696969; text-decoration: none;}.grid-header a:link{ color: #696969; text-decoration: none;}.grid-header a:visited{ color: #696969; text-decoration: none;}.grid-header a:hover{ color: darkred; text-decoration: none;}.grid-edit-column{ border-top: #696969 1px solid; border-bottom: #696969 1px solid; border-left: #696969 1px solid;}.grid-first-item{ border-top: #696969 1px solid; border-right: #696969 1px solid; border-bottom: #696969 1px solid; padding-right: 4px; padding-left: 4px; padding-bottom: 4px; padding-top: 4px; margin: 1px;}.grid-item{ border-right: #696969 1px solid; border-top: #696969 1px solid; border-left: #696969 1px double; border-bottom: #696969 1px solid; padding-right: 4px; padding-left: 4px; padding-bottom: 4px; padding-top: 4px; margin: 1px;}.grid-header{ border-bottom: #696969 1px solid; font-weight: bold; font-size: 11px; color: #696969; font-family: Verdana, Arial, Helvetica, sans-serif;}.grid-last-item{ border-top: #696969 1px solid; border-left: #696969 1px solid; border-bottom: #696969 1px solid; padding-right: 4px; padding-left: 4px; padding-bottom: 4px; padding-top: 4px; margin: 1px;}...... ...... /*************************************************************************************//****************************** datagrid.aspx ***********************************//*************************************************************************************/<asp:datagrid id="TimeEntryGrid" runat="server" BorderStyle="None" Width="100%" BorderColor="White" DataKeyField="EntryLogID" AllowSorting="True" FontSize="11px" Font-Name="Verdana" AutoGenerateColumns="False" CellPadding="2"> <headerstyle font-bold="True" cssclass="grid-header"></headerstyle> <columns> <asp:templatecolumn SortExpression="EntryDate" HeaderText="Day"> <headerstyle horizontalalign="Center" width="80px" cssclass="grid-header" verticalalign="Middle"></headerstyle> <itemstyle horizontalalign="Center" cssclass="grid-first-item"></itemstyle> <itemtemplate> <asp:label ID="EntryDay" Text=' <%# DataBinder.Eval(Container, "DataItem.EntryDate", "{0:ddd}") %>' Runat="server" Width='40px' /> </itemtemplate> <edititemtemplate> <asp:dropdownlist Width="48px" ID="EntryDays" CssClass="Standard-text" DataSource='<%# _dayListTable %>' DataTextField = "Day" DataValueField = "Date" Runat="server"> </asp:dropdownlist> </edititemtemplate> </asp:templatecolumn> <asp:templatecolumn SortExpression="ProjectName" HeaderText="Project"> <headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle> <itemstyle width="108px" cssclass="grid-item"></itemstyle> <itemtemplate> <asp:label ID="EntryProject" Text=' <%# DataBinder.Eval(Container, "DataItem.ProjectName") %>' Runat="server" /> <asp:label ID="EntryProjectID" Text='<%# DataBinder.Eval(Container, "DataItem.ProjectID") %>' Runat="server" Visible="False" /> </itemtemplate> <edititemtemplate> <asp:dropdownlist Width="100px" ID="EntryProjects" AutoPostBack="True" CssClass="Standard-text" DataSource='<%# ListUserProjects() %>' DataTextField="Name" DataValueField="ProjectID" Runat="server" OnSelectedIndexChanged="UserProjects_OnChange" /> </edititemtemplate> </asp:templatecolumn> <asp:templatecolumn SortExpression="CategoryName" HeaderText="Category"> <headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle> <itemstyle width="88px" cssclass="grid-item"></itemstyle> <itemtemplate> <asp:label ID="EntryCategory" Text=' <%# DataBinder.Eval(Container, "DataItem.CategoryName") %>' Runat="server" /> </itemtemplate> <edititemtemplate> <asp:dropdownlist Width="80px" ID="EntryCategories" CssClass="Standard-text" DataSource='<%# ListGridCategories(_userInput.ProjectID) %>' DataTextField="Abbreviation" DataValueField="CategoryID" Runat="server"> </asp:dropdownlist> </edititemtemplate> </asp:templatecolumn> <asp:templatecolumn SortExpression="Duration" HeaderText="Hours"> <headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle> <itemstyle horizontalalign="Right" width="50px" cssclass="grid-item"></itemstyle> <itemtemplate> <asp:label ID="EntryDuration" Text=' <%# DataBinder.Eval(Container.DataItem, "Duration", "{0:f}") %>' Runat="server" /> </itemtemplate> <edititemtemplate> <asp:textbox Width="40px" AutoPostBack=false CssClass="Standard-text" Runat="server" ID="EntryHours" Text='<%# _userInput.Duration %>' /> <asp:requiredfieldvalidator id="RequiredFieldValidatorGridHours" runat="server" ErrorMessage="Hours is required." ControlToValidate="EntryHours" Display="Dynamic"></asp:requiredfieldvalidator> <asp:comparevalidator id="CompareValidatorGridHours" runat="server" ErrorMessage="Hours must be numeric value." ControlToValidate="EntryHours" Display="Dynamic" Type="Currency" Operator="DataTypeCheck"></asp:comparevalidator> </edititemtemplate> </asp:templatecolumn> <asp:templatecolumn SortExpression="Description" HeaderText="Description"> <headerstyle horizontalalign="Left" cssclass="grid-header" verticalalign="Middle"></headerstyle> <itemstyle cssclass="grid-item"></itemstyle> <itemtemplate> <asp:label ID="GridDescription" Text=' <%# DataBinder.Eval(Container, "DataItem.Description") %>' Runat="server" /> </itemtemplate> <edititemtemplate> <asp:textbox runat="server" CssClass="Standard-text" ID="EntryDescription" Text='<%# _userInput.Description %>' Width="250" MaxLength="255"> </asp:textbox> </edititemtemplate> </asp:templatecolumn> <asp:templatecolumn HeaderText="Edit"> <headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle> <itemstyle cssclass="grid-edit-column"></itemstyle> <itemtemplate> <asp:imagebutton runat="server" ImageUrl="images/icon-pencil.gif" AlternateText="Edit" CommandName="Edit" CausesValidation="false" ID="Imagebutton1" NAME="Imagebutton1"></asp:imagebutton> <img src="images/spacer.gif" width="3"> <asp:imagebutton Runat="server" ImageUrl="images/icon-delete.gif" AlternateText="Delete" CommandName="Delete" CausesValidation="False" ID="Imagebutton2" NAME="Imagebutton2"></asp:imagebutton> </itemtemplate> <edititemtemplate> <asp:imagebutton runat="server" ImageUrl="images/icon-floppy.gif" AlternateText="Update" CommandName="Update" CausesValidation="False" ID="Imagebutton3" NAME="Imagebutton3"></asp:imagebutton> <img src="images/spacer.gif" width="3"> <asp:imagebutton runat="server" ImageUrl="images/icon-pencil-x.gif" AlternateText="Cancel" CommandName="Cancel" CausesValidation="False" ID="Imagebutton4" NAME="Imagebutton4"></asp:imagebutton> </edititemtemplate> </asp:templatecolumn> </columns> </asp:datagrid> up,下,谢谢提供datagrid风格的兄弟 弹出警告框 , 或者是新的网页 , 改变IE的标题 就是 <title>来信邮件了,快审批一下呀</title> 这个地方。 有提示信息的时候可以做成像msn那样的提示信息,可以这样: 类似msn的提示效果代码 <script language="javascript">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;// divHeightdocument.getElementById("eMeng").style.left = parseInt(document.body.scrollLeft,10) + docWidth - divWidthdocument.getElementById("eMeng").style.visibility="visible"objTimer = window.setInterval("moveDiv()",10)}catch(e){}} function resizeDiv(){i+=1if(i>500) 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)}</script><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; HEIGHT: 116px; BACKGROUND-COLOR: #c9d3f3"><TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0><TBODY><TR><TD style="FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #0f2c8c" width=30 height=24></TD><TD style="FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #1f336b; PADDING-TOP: 4px;PADDING-left: 4px" vAlign=center width="100%"> 短消息提示:</TD><TD style="BACKGROUND-IMAGE: url(msgTopBg.gif); PADDING-TOP: 2px;PADDING-right:2px" vAlign=center align=right width=19><span title=关闭 style="CURSOR: hand;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick=closeDiv() >×</span><!-- <IMG title=关闭 style="CURSOR: hand" onclick=closeDiv() hspace=3 src="msgClose.jpg"> --></TD></TR><TR><TD style="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: url(1msgBottomBg.jpg); PADDING-BOTTOM: 1px" colSpan=3 height=90><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%">您有<font color=#FF0000>1</font>封新短消息<BR><BR><DIV align=center style="word-break:break-all"><a href="javascript:alert('你好')"><font color=#FF0000>点击查看短信</font></a></DIV</DIV></TD></TR></TBODY></TABLE></DIV></body> js获取css类别名下的标签问题 字符串换行的问题? GridView编辑状态下的DropDownList二级联动问题 请高人露面,指点一下asp.net 2.0通过Active Directory认证如何实现,盼实例,或指导资料、书籍,感谢! 跪求 !!网站设计 求建立windows用户(并更改所属分组)asp.net(C#)的源代码 asp.net连接数据库 怎么能控制一个新打开的目标窗口最小化? datalist里怎样显示hyperlink? 关于DataGrid中的编辑功能的问题 如何给所有同类控件附以相同的属性 在aspx.cs中用javascript出问题?奇怪!
2.弹出及时消息页面:
A.aspx:
private void Button1_Click(object sender, System.EventArgs e)
{
string strscript="<script language='javascript'>";
strscript+="window.open('ss.htm','_blank','width=300,height=200,left=1000,top=1000');";
strscript+="</script>";
Response.Write(strscript);
}
//弹出小窗口
ss.htm:
<HTML>
<HEAD>
<title>PopupMessage</title>
<meta name="GENERATOR" Content="Microsoft Visual Studio .NET 7.1">
<meta name="CODE_LANGUAGE" Content="C#">
<META http-equiv="Content-Type" charset='gb2312"'>
<meta name="vs_defaultClientScript" content="JavaScript">
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5">
<SCRIPT language="JAVASCRIPT">
var originX=screen.width-250;
var originY=screen.height;
var timeID;
function onload()
{
mystart();
}
function raiseup(step) {
if(originY>450)
{
originY=originY-step;
window.moveTo(originX-10,originY);
}
} function mystart() {
timeID = setInterval('raiseup(10)',10);
} </SCRIPT>
</HEAD>
<body MS_POSITIONING="GridLayout" leftmargin=0 topmargin=0 onload="onload()">
<table border="0" cellpadding="0" cellspacing="0" width="100%" align=left>
<tr width="100%">
<td align=left valign=top>
hi,you have a message!
</td>
</tr>
</table>
</body>
</HTML>
省略号中的内容贴在这里:/*************************************************************************************/
/****************************** styles.css ***********************************/
/*************************************************************************************/
...... ......
.grid-header a:active
{
color: #696969;
text-decoration: none;
}
.grid-header a:link
{
color: #696969;
text-decoration: none;
}
.grid-header a:visited
{
color: #696969;
text-decoration: none;
}
.grid-header a:hover
{
color: darkred;
text-decoration: none;
}
.grid-edit-column
{
border-top: #696969 1px solid;
border-bottom: #696969 1px solid;
border-left: #696969 1px solid;
}
.grid-first-item
{
border-top: #696969 1px solid;
border-right: #696969 1px solid;
border-bottom: #696969 1px solid;
padding-right: 4px;
padding-left: 4px;
padding-bottom: 4px;
padding-top: 4px;
margin: 1px;
}
.grid-item
{
border-right: #696969 1px solid;
border-top: #696969 1px solid;
border-left: #696969 1px double;
border-bottom: #696969 1px solid;
padding-right: 4px;
padding-left: 4px;
padding-bottom: 4px;
padding-top: 4px;
margin: 1px;
}
.grid-header
{
border-bottom: #696969 1px solid;
font-weight: bold;
font-size: 11px;
color: #696969;
font-family: Verdana, Arial, Helvetica, sans-serif;
}
.grid-last-item
{
border-top: #696969 1px solid;
border-left: #696969 1px solid;
border-bottom: #696969 1px solid;
padding-right: 4px;
padding-left: 4px;
padding-bottom: 4px;
padding-top: 4px;
margin: 1px;
}
...... ......
/*************************************************************************************/
/****************************** datagrid.aspx ***********************************/
/*************************************************************************************/
<asp:datagrid id="TimeEntryGrid" runat="server" BorderStyle="None" Width="100%" BorderColor="White"
DataKeyField="EntryLogID" AllowSorting="True" FontSize="11px" Font-Name="Verdana" AutoGenerateColumns="False"
CellPadding="2">
<headerstyle font-bold="True" cssclass="grid-header"></headerstyle>
<columns>
<asp:templatecolumn SortExpression="EntryDate" HeaderText="Day">
<headerstyle horizontalalign="Center" width="80px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle horizontalalign="Center" cssclass="grid-first-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryDay" Text=' <%# DataBinder.Eval(Container, "DataItem.EntryDate", "{0:ddd}") %>' Runat="server" Width='40px' />
</itemtemplate>
<edititemtemplate>
<asp:dropdownlist Width="48px" ID="EntryDays" CssClass="Standard-text" DataSource='<%# _dayListTable %>' DataTextField = "Day" DataValueField = "Date" Runat="server">
</asp:dropdownlist>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="ProjectName" HeaderText="Project">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle width="108px" cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryProject" Text=' <%# DataBinder.Eval(Container, "DataItem.ProjectName") %>' Runat="server" />
<asp:label ID="EntryProjectID" Text='<%# DataBinder.Eval(Container, "DataItem.ProjectID") %>' Runat="server" Visible="False" />
</itemtemplate>
<edititemtemplate>
<asp:dropdownlist Width="100px" ID="EntryProjects" AutoPostBack="True" CssClass="Standard-text" DataSource='<%# ListUserProjects() %>' DataTextField="Name" DataValueField="ProjectID" Runat="server" OnSelectedIndexChanged="UserProjects_OnChange" />
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="CategoryName" HeaderText="Category">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle width="88px" cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryCategory" Text=' <%# DataBinder.Eval(Container, "DataItem.CategoryName") %>' Runat="server" />
</itemtemplate>
<edititemtemplate>
<asp:dropdownlist Width="80px" ID="EntryCategories" CssClass="Standard-text" DataSource='<%# ListGridCategories(_userInput.ProjectID) %>' DataTextField="Abbreviation" DataValueField="CategoryID" Runat="server">
</asp:dropdownlist>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="Duration" HeaderText="Hours">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle horizontalalign="Right" width="50px" cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="EntryDuration" Text=' <%# DataBinder.Eval(Container.DataItem, "Duration", "{0:f}") %>' Runat="server" />
</itemtemplate>
<edititemtemplate>
<asp:textbox Width="40px" AutoPostBack=false CssClass="Standard-text" Runat="server" ID="EntryHours" Text='<%# _userInput.Duration %>' />
<asp:requiredfieldvalidator id="RequiredFieldValidatorGridHours" runat="server" ErrorMessage="Hours is required."
ControlToValidate="EntryHours" Display="Dynamic"></asp:requiredfieldvalidator>
<asp:comparevalidator id="CompareValidatorGridHours" runat="server" ErrorMessage="Hours must be numeric value."
ControlToValidate="EntryHours" Display="Dynamic" Type="Currency" Operator="DataTypeCheck"></asp:comparevalidator>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn SortExpression="Description" HeaderText="Description">
<headerstyle horizontalalign="Left" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle cssclass="grid-item"></itemstyle>
<itemtemplate>
<asp:label ID="GridDescription" Text=' <%# DataBinder.Eval(Container, "DataItem.Description") %>' Runat="server" />
</itemtemplate>
<edititemtemplate>
<asp:textbox runat="server" CssClass="Standard-text" ID="EntryDescription" Text='<%# _userInput.Description %>' Width="250" MaxLength="255">
</asp:textbox>
</edititemtemplate>
</asp:templatecolumn>
<asp:templatecolumn HeaderText="Edit">
<headerstyle horizontalalign="Center" width="40px" cssclass="grid-header" verticalalign="Middle"></headerstyle>
<itemstyle cssclass="grid-edit-column"></itemstyle>
<itemtemplate>
<asp:imagebutton runat="server" ImageUrl="images/icon-pencil.gif" AlternateText="Edit" CommandName="Edit"
CausesValidation="false" ID="Imagebutton1" NAME="Imagebutton1"></asp:imagebutton>
<img src="images/spacer.gif" width="3">
<asp:imagebutton Runat="server" ImageUrl="images/icon-delete.gif" AlternateText="Delete" CommandName="Delete"
CausesValidation="False" ID="Imagebutton2" NAME="Imagebutton2"></asp:imagebutton>
</itemtemplate>
<edititemtemplate>
<asp:imagebutton runat="server" ImageUrl="images/icon-floppy.gif" AlternateText="Update" CommandName="Update"
CausesValidation="False" ID="Imagebutton3" NAME="Imagebutton3"></asp:imagebutton>
<img src="images/spacer.gif" width="3">
<asp:imagebutton runat="server" ImageUrl="images/icon-pencil-x.gif" AlternateText="Cancel" CommandName="Cancel"
CausesValidation="False" ID="Imagebutton4" NAME="Imagebutton4"></asp:imagebutton>
</edititemtemplate>
</asp:templatecolumn>
</columns>
</asp:datagrid>
类似msn的提示效果代码
<script language="javascript">
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>500) 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)
}
</script>
<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; HEIGHT: 116px; BACKGROUND-COLOR: #c9d3f3">
<TABLE style="BORDER-TOP: #ffffff 1px solid; BORDER-LEFT: #ffffff 1px solid" cellSpacing=0 cellPadding=0 width="100%" bgColor=#cfdef4 border=0>
<TBODY>
<TR>
<TD style="FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #0f2c8c" width=30 height=24></TD>
<TD style="FONT-WEIGHT: normal; FONT-SIZE: 12px; BACKGROUND-IMAGE: url(msgTopBg.gif); COLOR: #1f336b; PADDING-TOP: 4px;PADDING-left: 4px" vAlign=center width="100%"> 短消息提示:</TD>
<TD style="BACKGROUND-IMAGE: url(msgTopBg.gif); PADDING-TOP: 2px;PADDING-right:2px" vAlign=center align=right width=19><span title=关闭 style="CURSOR: hand;color:red;font-size:12px;font-weight:bold;margin-right:4px;" onclick=closeDiv() >×</span><!-- <IMG title=关闭 style="CURSOR: hand" onclick=closeDiv() hspace=3 src="msgClose.jpg"> --></TD>
</TR>
<TR>
<TD style="PADDING-RIGHT: 1px; BACKGROUND-IMAGE: url(1msgBottomBg.jpg); PADDING-BOTTOM: 1px" colSpan=3 height=90>
<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%">您有<font color=#FF0000>1</font>封新短消息<BR><BR>
<DIV align=center style="word-break:break-all"><a href="javascript:alert('你好')"><font color=#FF0000>点击查看短信</font></a></DIV</DIV>
</TD>
</TR>
</TBODY>
</TABLE>
</DIV>
</body>