问一个UpdatePanel的问题!
代码如下:
<asp:UpdatePanel ID= "UpdatePanel1 " runat= "server ">
<ContentTemplate>
<asp:Button ID= "Button1 " runat= "server " Text= "Button1 " OnClick= "Button1_Click " />
<asp:Panel ID= "Panel1 " runat= "server " Visible= "false ">
<asp:Textbox ID= "Button1 " runat= "server " Text= "Text 1 "> </asp:Textbox>
</asp:Panel>
<script type= "text/javascript ">
var textbox = document.getElementById( " <%=Panel1.ClientID%> ");
alert(textbox.value);
</script>
</ContentTemplate>
</asp:UpdatePanel>
Button1_Click这里面是把Panel1的Visible设为true, Panel1显示出来了, 但是里面的javascript怎么不能执行? javascript里要用到Panel1里面的控件, 请问应该怎么办?
------解决方案--------------------这个不能使用Panel,你使用 隐藏域 试试看