问题描述
<asp:ScriptManagerID="ScriptManager1"runat="server"></asp:ScriptManager><divid="dlg_message"style="width:200px;height:200px"><div><asp:UpdatePanelID="UpdatePanel1"runat="server"><ContentTemplate><div><tablestyle="text-align:center"><tr><td>短信类型:</td><td><asp:DropDownListID="ddl_messageType"AutoPostBack="true"runat="server"OnSelectedIndexChanged="ddl_messageType_SelectedIndexChanged"></asp:DropDownList></td></tr><tr><td>短信内容:</td><td><asp:DropDownListID="ddl_messageContent"runat="server"></asp:DropDownList></td></tr><tr><tdcolspan="2"><asp:ButtonID="btn_messageOK"runat="server"Text="确定"OnClick="btn_messageOK_Click"/> <asp:ButtonID="btn_messageCancel"runat="server"Text="取消"OnClientClick="returncloseMessage()"/></td></tr></table></div>
<scripttype="text/javascript">vardlg_message;$(function(){vardlg_message=$('#div_access').dialog({title:'添加用户',closed:true,modal:true});dlg_message.parent().appendTo(jQuery("form:first"));});functionshowMessage(){$('#div_access').dialog('open');returnfalse;}functioncloseMessage(){$('#div_access').dialog('close');returnfalse;}</script>
就是要实现两个ddl的连动,现在这个代码会让界面直接呈现div,没有隐藏。
解决方案
解决方案二:
<divid="dlg_message"style="width:200px;height:200px;display:none">
解决方案三:
引用1楼andywangguanxi的回复:
<divid="dlg_message"style="width:200px;height:200px;display:none">
主要是点击dialog用不了了