弹出窗口,关闭窗口刷新

 <input type="button" value="Edit" class="btn btn-primary btn-xs" οnclick="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"  οnclick="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 οnclick="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" οnclick="Add()" value="Add Password" class="btn btn-primary btn-xs" />

<div id="div_add" title="addPassword" class="easyui-dialog" closed="true" style="width: 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" οnclick="ColseDialog()" class="easyui-linkbutton  searchFormButton" />
                </td>
            </tr>
        </table>
    </div>

转载于:https://www.cnblogs.com/suan1717/p/6483683.html

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值