将+,-,作为字符串/字符插入HTML页面
如何在HTML页面中插入+,-,<,>字符 我想让它们显示为按钮的标题将+,-,作为字符串/字符插入HTML页面,html,Html,如何在HTML页面中插入+,-,字符 我想让它们显示为按钮的标题 <button id="button2" type="button">+</button> <button id="button3" type="button">-</button> <button id="button4" type="button"><</button> <button id="button5"
<button id="button2" type="button">+</button>
<button id="button3" type="button">-</button>
<button id="button4" type="button"><</button>
<button id="button5" type="button">></button>
上述方法不起作用。
我如何才能做到这一点?您可以使用HTML数字和代码:
<button id="button2" type="button">+</button>
<button id="button3" type="button">-</button>
<button id="button4" type="button"><</button>
<button id="button5" type="button">></button>
以下是完整的表格:
用谷歌搜索+符号:使用适当的HTML实体,例如和。这个问题不够精确。+和-以及<可能在许多浏览器中都可以使用?+,-都可以,但这会使按钮UI不清晰地压缩。是否需要type=button?
> = >
< = <
- = −