• 在页面弹出漂亮的提示框右下角弹出,方正的框


    <%@ 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);
    
        }
    }
    
    
    
  • 相关阅读:
    MySql 踩坑小记
    Redux 实现过程的推演
    正则表达式的一些探索(偏JavaScript)
    [python工具] 如何使用plotly制作散列图
    使用epoll实现一个udp server && client
    python 实现一个简单tcp epoll socket
    [原创]差分放大器阻抗匹配计算+阻抗计算小工具
    将博客搬至CSDN
    [转]谈NAND Flash的底层结构和解析
    [原创]Fashion汽车定位器拆解
  • 原文地址:https://www.cnblogs.com/xiaofengfeng/p/1808437.html
Copyright © 2020-2023  润新知