<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click1" />
<asp:HiddenField runat="server" ID="strid"></asp:HiddenField>
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
</div>
</form>
<script language="javascript">
var oPopup =window.createPopup();
var popTop=50;
function popmsg(msgstr)
{
var winstr="<table style=\"border: 1 solid #FFA6CA\" width=\"241\" height=\"172\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" background=\"http://www.mikecat.net/mike/mikepp.gif\" >";
winstr+="<tr><td height=\"30\"> </td></tr><tr><td align=\"center\"><table width=\"90%\" height=\"110\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\">";
winstr+="<tr><td valign=\"top\" style=\"font-size:18px; color: blue;\">"+msgstr+"</td></tr></table></td></tr></table>";
oPopup.document.body.innerHTML=winstr;
popshow();
}
function popshow(){
window.status=popTop;
if(popTop>1720)
{
clearTimeout(mytime);
oPopup.hide();
return;
}
else if(popTop>1520&&popTop<1720){
oPopup.show(screen.width-250,screen.height,241,1720-popTop);
}else if(popTop>1500&&popTop<1520){
oPopup.show(screen.width-250,screen.height+(popTop-1720),241,172);
}else if(popTop<180){
oPopup.show(screen.width-250,screen.height,241,popTop);
}else if(popTop<220){
oPopup.show(screen.width-250,screen.height-popTop,241,172);
}
popTop+=10;
var mytime=setTimeout("popshow();",50);
}
popmsg(msg);
</script>
</body>
</html>
下面是源文件用来显示的数据都可以由后台完成哦!
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
public partial class _Default : System.Web.UI.Page
{
string msg;
string cstext = "";
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
ClientScriptManager cs = Page.ClientScript;
cstext = "aaa";
cs.RegisterClientScriptBlock(Page.GetType(), "strscript", "msg='" + cstext + "'", true);
}
msg = "aaa";
}
protected void Button1_Click(object sender, EventArgs e)
{
}
protected void Button1_Click1(object sender, EventArgs e)
{
cstext = "bbb";
ClientScriptManager cs = Page.ClientScript;
cs.RegisterClientScriptBlock(Page.GetType(), "strscript", "msg='" + cstext + "'", true);
}
}