zoukankan      html  css  js  c++  java
  • 弹出窗口,关闭窗口刷新

     <input type="button" value="Edit" class="btn btn-primary btn-xs" onclick="EditComp()" />

    <script type="text/javascript">
            function EditComp()
            {
                var comp_id =$("#<%=lblCompID.ClientID%>").text();
                if(comp_id=="" )
                {
                    return;
                }
                var url = "../edit/EditCompany.aspx?comp_id=" + comp_id.toString() ;
                layer.open({
                    type: 2,
                    title: 'Edit Company',
                    closeBtn: 1,
                    shade: [0],
                    area: ['910px', '550px'],
                    content: [url, 'yes']

                });
            }

    function closeLayer() {
                 var index = parent.layer.getFrameIndex(window.name);
                 parent.layer.close(index);
                 winClose();
             }

    <input type="button" value="Close"  onclick="closeLayer()"  class="easyui-linkbutton  searchFormButton"/>

    第二种:

    <script >

    function openwin(id)
    {

    window.open("newwindow.aspx?id="+id,"newwindow","height=500,width=800,toolbar=0,member=no,scrollbars=no,reszable=no,location=no,stuatus=no")
    }
    </script>

    repeater包含的  <asp:Label ID="lblID" runat="server" Text='<%# Eval("id")%>'></asp:Label>

    <a onclick="openwin(<%# Eval("id")%>)">----</a>跳转

    点击添加按钮,弹框js

    <script>
            function Add() {
                $('#div_add').dialog('open').parent().appendTo($("form"));
            };
            function ColseDialog() {
                $('#div_add').dialog('close');
            }

        </script>

    <input style="margin-left:5px" type="button" onclick="Add()" value="Add Password" class="btn btn-primary btn-xs" />

    <div id="div_add" title="addPassword" class="easyui-dialog" closed="true" style=" 450px; height: 250px; padding: 10px;" data-options="iconCls:'icon-save',closable:true">
              <table>

              <tr>

                  <td>
                        <asp:TextBox ID="txt_password" runat="server" Width="220px" CssClass="easyui-textbox"></asp:TextBox>
                    </td>
                </tr>
              
                <tr>
                    <td>&nbsp;</td>
                    <td>
                        <asp:Button ID="btnConfirmAdd" runat="server" Text="Add" CssClass="easyui-linkbutton searchFormButton"     OnClick="btnConfirmAdd_Click" />
                        <input style="margin-left: 10px;" type="button" value="Cancel" onclick="ColseDialog()" class="easyui-linkbutton  searchFormButton" />
                    </td>
                </tr>
            </table>
        </div>

  • 相关阅读:
    EntityFramework 启用迁移 EnableMigrations 报异常 "No context type was found in the assembly"
    JAVA 访问FTP服务器示例(2)
    NuGet Package Manager 更新错误解决办法
    JAVA 访问FTP服务器示例(1)
    RemoteAttribute 的使用问题
    诡异的 javascript 变量
    javascript apply用法
    Babun 中文乱码
    GSM呼叫过程
    转站博客园
  • 原文地址:https://www.cnblogs.com/suan1717/p/6483683.html
Copyright © 2011-2022 走看看