• jquery.modalbox.show 插件


    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="Default.aspx.cs" Inherits="WebApplication1._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>

        
    <script src="scripts/jquery.js" type="text/javascript"></script>

        
    <script src="scripts/bgiframe.js" type="text/javascript"></script>

        
    <script src="source/modalbox.js" type="text/javascript"></script>

        
    <link href="source/modalbox.css" rel="stylesheet" type="text/css" />
        
    <script type="text/javascript">
            $(document).ready(
    function() {

        });

        
    function showModal() {
        
            $.modalbox.show({
                modal: 
    true,
    //            contentType: 'html', // html selector url
    //
                content: "<h1>这是内容</h1>", // 依据 contentType 而定

                contentType: 
    'selector'// html selector url
                content: "#dialog"// 依据 contentType 而定
                 600,
                height: 
    400,
    //            contentType: "url",
    //
                content: "Child.aspx"
                showCancel: false,
                showOk: 
    true,
                showTitle: 
    true,
                
                onok:doOK
    //            okBtnName: 'OK',
    //
                cancelBtnName: 'Cancel',
    //
                zIndex: 900,
    //
                onclose: null, // function 关闭后执行
    //
                onopen: null, // function, 只有返回true时才会显示窗口
    //
                onok: null, // function 点击确定按钮后,窗口关闭前执行
    //
                oncancel: null // function 点击取消按钮后,窗口关闭前执行
            
            });
        }
        
    function doOK() {
            document.getElementById(
    'Button1').click();
            
    return false;
        }
        
    </script>
    </head>
    <body>
        
    <form id="form1" runat="server">
        
    <asp:ScriptManager ID="ScriptManager1" runat="server">
        
    </asp:ScriptManager>    
        
    <div>    
        
    <input type="button" onclick="showModal();" value="弹 出" />    
        
    <center>
            
    <h1>klsdjflksjdflskjdflk</h1>
        
    </center>
            
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
                
    <ContentTemplate>
                    
    <div id="dialog" style="display:none">
                        
    <asp:Label ID="Label1" runat="server" Text="Label"></asp:Label>
                    
    </div>
                    
    <asp:Button ID="Button1" runat="server" Text="Button" OnClick="Button1_Click" style="display:none" />
                
    </ContentTemplate>
            
    </asp:UpdatePanel>    
        
    </div>
        
    </form>
    </body>
    </html>

    /Files/wucg/modalbox.zip

  • 相关阅读:
    【数据分析】6 点发的文章在博客园阅读量最高?
    canvas api 速记
    leetcode 315. Count of Smaller Numbers After Self 两种思路
    一道闭包题题解
    一道经典JS题(关于this)
    HTML5 — 让拖放变的流行起来
    你应该知道的25道Javascript面试题
    关于base64编码的原理和实现
    Python中的None
    Python字符编码和转码
  • 原文地址:https://www.cnblogs.com/wucg/p/1799358.html
Copyright © 2020-2023  润新知