日期:2014-05-18  浏览次数:20543 次

试了好长时间都不对,如何得到Panel的ID!?
<script   language= "javascript "   type= "text/javascript ">
function   isNull()
{
          document.getElementById( "Panel1 ").Visible   =   true;
}
</script>

<asp:Panel   ID= "Panel1 "   runat= "server "   Height= "202px "   Width= "449px "   Visible= "false "> 1     2
</asp:Panel>

<input   id= "Button1 "   type= "button "   value= "button "   onclick= "isNull(); "   />

像这样写总是不对,请大家指点一下吧!!
小弟在这里感激了!

------解决方案--------------------
你在调试的时候查看 html源代码,找到PANEL看看ID是否如一
------解决方案--------------------
document.getElementById( "Panel1 ").Visible = true;
改为
document.getElementById( "Panel1 ").style.display = " ";