我有一个 div,我通过 Page.ClientScript.RegisterStartupScript
从代码后面调用它
另一个 div 位于此 div 中,带有 style="display: none;
是否可以在后台调用主div时启用第二个div?
这是我的代码-
Page.ClientScript.RegisterStartupScript(this.GetType(), "OpenNewWindow", "<script type='text/javascript'>$(function() { $('#MainDiv').dialog('open'); })</script>");
最佳答案
put these attributes in div runat="server" and an id="a_name"
Declare Your div like following
<div runat="server" id="dv">
your contents
</div>
call the dv from Code behind and then do with that dv whatever you want
关于c# - 如何禁用 C# 中的 div 代码?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/17629511/