Multiple submits in an HTML form
- by StackOverflowNewbie
I have an HTML form that needs multiple submit buttons, like this:
<input type="submit" name="foo" value="1"/>
<input type="submit" name="foo" value="2"/>
<input type="submit" name="foo" value="3"/>
The problem is that I want it to display on the button something other than what is in the value attribute (in the example above: 1, 2, 3). For example, I want to show "Bar" for the button with value="1". Is this possible?
I've considered using the <button> tag, like this:
<button name="foo" value="1">Bar</button>
The problem with using <button> (from w3schools):
If you use the element in an HTML form, different browsers
may submit different values. Internet Explorer, prior version 9, will
submit the text between the and tags, while other
browsers will submit the content of the value attribute. Use the
element to create buttons in an HTML form.
Thoughts?