首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 网站开发 > asp.net >

试了好长时间都不对,怎么得到Panel的ID!

2012-01-31 
试了好长时间都不对,如何得到Panel的ID!?scriptlanguage javascript type text/javascript functi

试了好长时间都不对,如何得到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 = " ";

热点排行