<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>