我有我的Page_Load注册这个如何隐藏或显示一个div
Page.ClientScript.RegisterStartupScript(this.GetType(), "clientscript", "document.getElementById('showdiv').style.visibility = 'hidden';", true);
但它没有得到隐藏的......是如我的div下面
<div id="showdiv">
<input class="button" type="button" value="OK" name="success_button" id="my button" onclick="javascript:window.close();" />
</div>
我在做什么错?。感谢您的帮助
你有任何的UpdatePanel? –
尝试寻找页面源代码是否真的在做什么。 – IvanH
请检查以下建议:http://stackoverflow.com/questions/9572265/which-of-these-methods-is-the-correct-way-to-show-hide-rows-in-asp-net – atconway