input type button - label vs value

前端 未结 1 2027
日久生厌
日久生厌 2020-12-12 23:03

I think that the normal behavior of a button like the one below is that the value attribute serves as a label as well:



        
相关标签:
1条回答
  • 2020-12-12 23:45

    Use the HTML Button element, with type submit, instead:

    <button type="submit" name="submitButton" value="DeleteAnswer22">Delete Answer 22</button>
    

    This will result in a submit button that sends the value DeleteAnswer22 but displays "Delete Answer 22".

    0 讨论(0)
提交回复
热议问题