在HTML中设置LI标签的值 [英] Set values of LI tag in HTML

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

问题描述

我有一个有序列表,我需要设置#值。例如:

I have a Ordered list that I need to set the # values for. Something like:

<ol>
 <li ShowValue=34>apple</li>
 <li ShowValue=45>pear</li>
 <li ShowValue=55>car</li>
</ol>

让它们以我分配的数字显示

So that they display with the numbers I assign

34.apple
45.pear
55.car

有没有办法告诉LI应该显示什么数字?

Is there a way to tell the LI what number it should show?

推荐答案

如果您使用HTML 4.01你可以这样做:

If you use HTML 4.01 you can do this:

<ol>
  <li value="34">apple</li>
  ...
</ol>



注意已弃用

这篇关于在HTML中设置LI标签的值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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