zoukankan      html  css  js  c++  java
  • 在页面弹出漂亮的提示框右下角弹出,方正的框

    <%@ 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);
    
        }
    }
    
    
    
  • 相关阅读:
    (转)卡特兰数
    fatal error LNK1123: 转换到 COFF 期间失败
    cocos2dx 中文乱码问题
    c++ primer查漏补缺(一)命名空间
    Centos 7 二进制部署高可用Kubernetes v1.17.x
    hostAliases给pod增加域名解析
    常用的清理 Kubernetes 集群资源命令
    Kubernets 污点与容忍
    Docker 常用命令大全
    Kubernets健康检查——配置存活、就绪和启动探测器
  • 原文地址:https://www.cnblogs.com/xiaofengfeng/p/1808437.html
Copyright © 2011-2022 走看看