从“div”中删除样式在asp.net中标记 [英] Delete A style from a "div" tag in asp.net
本文介绍了从“div”中删除样式在asp.net中标记的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
您好
我有以下标签。我想将可见性样式从隐藏转换为可见。
我正在使用C#。
你能帮我吗?
< ; div id < span class =code-keyword> = errorDiv class = errorDiv runat = server style = visibility:hidden; >
< asp:标签 ID = errorLbl CssClass = errorLbl runat = 服务器 > < / asp:标签 >
< / div >
解决方案
在服务器上(C#):
errorDiv.Style [ visibility] = ;
在Javascript:
var errorDiv = document .getElementById( errorDiv跨度>);
errorDiv.style.visibility = ;
Hello
I have the folowing tag.I want to convert visibility Style from hidden to visible.
I''m using C#.
can you help me?
<div id="errorDiv" class="errorDiv" runat="server" style="visibility: hidden;">
<asp:Label ID="errorLbl" CssClass="errorLbl" runat="server"></asp:Label>
</div>
解决方案
On the server (C#):
errorDiv.Style["visibility"] = "";
In Javascript:
var errorDiv = document.getElementById("errorDiv"); errorDiv.style.visibility= "";
这篇关于从“div”中删除样式在asp.net中标记的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文