用JQ easyui做弹出层时遇到的问题解决方法

<div id="info" class="easyui-window" data-options="iconCls:'icon-save',title:'上传',modal:true,fix:true" closed="true">
        <table width="400px" cellpadding="3" cellspacing="1" style="margin: 10px">
            <tr>
                <td class="t1">
                    <asp:HiddenField ID="hfAttr" runat="server" />
                    <asp:Literal runat="server" ID="ltTitle"></asp:Literal>
                    <asp:FileUpload ID="fuData" runat="server" Width="370px" CssClass="buttonCss" />
                </td>
            </tr>
            <tr>
                <td>
                    <asp:TextBox ID="txtData" runat="server" Width="300px"></asp:TextBox>(附件说明)
                </td>
            </tr>
            <tr>
                <td class="t1" align="right">
                    <asp:LinkButton ID="btnSaveFile" runat="server" Text="上传" CssClass="easyui-linkbutton" data-options="iconCls:'icon-ok'"
                        Width="80px" OnClientClick="javascript:submit();" OnClick="btnSaveFile_Click" />
                    <a data-options="iconCls:'icon-cancel'" class="easyui-linkbutton" id="btnClose"  οnclick="closeWindow()" >返回</a>
                </td>
            </tr>
        </table>
    </div>

用JQ easyui的时候,后台找不到在用了easyui的table里面的控件的值,之后发现要将控件重新添加到form里面,要写
function submit() {
            form = document.forms[0];
            form.onsubmit = function() {
                $("#<%=fuData.ClientID %>").appendTo("form#aspnetForm");
                $("#<%=txtData.ClientID %>").appendTo("form#aspnetForm");
            }
        }
这样才能把控件弄到同一个from


functionopenWindow() {

            $("#info").attr("closed","false");

            $("#<%=ckbUser.ClientID%>").attr("checked","true");

            $("#<%=ckbDep.ClientID%>").attr("checked","true");

        }

 

 

用了easyui,结果直接写Checked=”true”不行,一定要在打开窗口的时候attr属性给控件

 

<tr>

                    <td class="t1" colspan="2">

                        <asp:CheckBox runat="server" ID="ckbUser" Text="需要用户查看招标文件" />

                        <asp:CheckBox runat="server" ID="ckbDep" Text="需要职能部门查看招标文件" />

                    </td>

                </tr>


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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值