如何使用< sup></sup>在< option></option>中在HTML中 [英] How can I use <sup></sup> in <option></option> in Html
本文介绍了如何使用< sup></sup>在< option></option>中在HTML中的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有这样的代码:
<select>
<option>1</option>
<option>2</option>
<option>3</option>
</select>
我可以这样使用吗?
<select>
<option><sup>1</sup></option>
<option><sup>2</sup></option>
<option><sup>2</sup></option>
</select>
推荐答案
您不能在options标记内使用另一个标记. 但是您可以执行以下操作:
You can't use another tag inside options tag. But you can do something like:
<select>
<option>¹</option>
<option>²</option>
<option>³</option>
</select>
此&sub1
,&sub2
,&sub3
仅适用于1、2和3.
This &sub1
, &sub2
, &sub3
is only possible for 1, 2 and 3.
您可以使用以下代码编写其他数字: 上标图表
You can write other numbers using codes from here: Superscript Chart
或者您可以使用此网站获取字母的unicode: Unicode字符搜索
Or you can use this website to get the unicodes of alphabets: Unicode Character Search
这篇关于如何使用< sup></sup>在< option></option>中在HTML中的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文