Html标签文本属性 [英] Html label text property

查看:131
本文介绍了Html标签文本属性的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在Asp.net网站上使用 html 标签。

我想要标签文字属性



但不是这样的



< label for =male>男< / label> ;.



如何为HTML标签控件声明文本属性?



以下是Asp标签。我希望asp标签替换为HTML标签

I am using html label in Asp.net website.
I want label Text property

but not like this

<label for="male">Male</label>.

How to declare text property for HTML label control ?

following is Asp label. I want asp label replace to HTML label

<asp:Label ID="lblHeaderName" runat="server" ForeColor="White" Text="<%$ Resources:GlobalResources, lbl_FinalInspection %>"></asp:Label>





我尝试过:



< label for =maleval ='Male'>< / label>



< label for =maleval =Male>< / label>



What I have tried:

<label for="male" val='Male'></label>

<label for="male" val="Male"></label>

推荐答案

资源:GlobalResources,lbl_FinalInspection %> > < span class =code-keyword>< / asp:Label >
Resources:GlobalResources, lbl_FinalInspection %>"></asp:Label>





我尝试过:



< label for =maleval ='Male'>< / label>



< label for =maleval =Male> ;< / label>



What I have tried:

<label for="male" val='Male'></label>

<label for="male" val="Male"></label>


查看这些



ASP.NET中的代码块 [ ^ ]

< a href =http://www.codeproject.com/Answers/1095418/How-to-get-a-value-from-resource-file-into-label-w#answer1>类似问题早些时候在Codeproject中得到了回答 [ ^ ]



Check these

Code Blocks in ASP.NET[^]
Similar question answered earlier in Codeproject [^]

<label> 
            <%= DateTime.Today.ToShortDateString() %>
</label>



< br $> b $ b




<label> 
            <%= Your Server Object %>
</label>


你不知道什么是什么这个元素呢。没有这样的事情,整个问题没有意义。

要理解它的作用,请阅读(除了我对问题的评论),例如,标签 - HTML | MDN [ ^ ]。



-SA
You have no clue on what this element does. There is no such thing, and the whole question makes no sense.
To understand what it does, please read (in addition to my comment to the question), for example, Label — HTML | MDN[^].

—SA


这篇关于Html标签文本属性的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆