本文介绍了输入类型按钮 - 标签与值的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我认为像下面那样的按钮的正常行为是:值
属性也可以作为标签:
I think that the normal behavior of a button like the one below is that the value
attribute serves as a label as well:
<input type="submit" name="submitButton" value="DeleteAnswer22" />
是否可以为显示标签和值分别设置属性?
Is it possible to have separate attributes for display label and value?
推荐答案
使用元素,类型提交
,而不是:
Use the HTML Button element, with type submit
, instead:
<button type="submit" name="submitButton" value="DeleteAnswer22">Delete Answer 22</button>
这将导致提交按钮发送值 DeleteAnswer22
但显示删除答案22。
This will result in a submit button that sends the value DeleteAnswer22
but displays "Delete Answer 22".
这篇关于输入类型按钮 - 标签与值的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!