zoukankan      html  css  js  c++  java
  • fineui 模拟右下角弹窗

    <!DOCTYPE html>

    <html xmlns="http://www.w3.org/1999/xhtml">

    <head runat="server">

        <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />

        <title></title>

    </head>

    <body>

        <form id="form1" runat="server">

            <f:PageManager runat="server" />

           

            <f:Button runat="server" ID="btn1" OnClick="btn1_OnClick" Text="haha"></f:Button>

            <f:Window ID="Window1" runat="server" Height="200px" Width="300px" IsModal="true" EnableMaximize="True"

                CloseAction="HidePostBack" EnableIFrame="True" Hidden="False" Icon="ApplicationFormEdit"

                Target="Top" EnableResize="True">

            </f:Window>

        </form>

    </body>

    </html>

    <script src="../../res/js/jquery.js"></script>

    <script>

        Ext.onReady(function () {

            setWin();

        });

        function setWin() {

            var window1 = F('<%=Window1.ClientID %>');

            //alert(window1.getHeight() + "-" + window1.getWidth() + " " + ($(window).width() - window1.getWidth()));

            window1.setX($(window).width() - window1.getWidth());

            window1.setY($(window).height() - window1.getHeight());

        }

    </script>

    后台代码:

    protected void btn1_OnClick(object sender, EventArgs e)

            {

                PageContext.RegisterStartupScript(Window1.GetShowReference("alert.aspx", "查看库存") + "setWin();");

            }

    有个小bug,如果浏览器变小或变大,弹窗位置会改变,我这没处理,如果有兴趣自己改下。~.~

  • 相关阅读:
    畜栏预定【贪心+小根堆】
    电影【离散化】
    最佳牛栏(前缀和+二分)
    防晒【贪心 + 平衡树】
    货仓选址【中位数】证明
    24个不易混淆的数字和字母,常用于密码或密钥
    win8上的新功能,不知道win7有木有,刚偶然发现的
    通过C#类库绘制正态分布的统计图(通用)
    C#组播消息收发
    使用c#类库绘制柱状图
  • 原文地址:https://www.cnblogs.com/sundayisblue/p/7109754.html
Copyright © 2011-2022 走看看