title: <button type="submit"> compatibility?
body: <p>I'd like to have a submit button that submits a different value than is displayed on the button. With <code>&lt;input type="submit"&gt;</code> you can't seem to do this. With <code>&lt;button type="submit"&gt;</code> however, these can be two different values. The question is, will it work in all browsers?</p>
  
  <p>Trying this test code here:</p>
  
  <pre><code>&lt;form method="get" action=""&gt;
      &lt;input type="text" name="txt"/&gt;
      &lt;button type="submit" name="btn" value="val"&gt;text&lt;/button&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In FF 3.6 it updates my address bar with both values appropriately (and responds to me pressing enter in the text box). In IE 8, it also accepts pressing enter, displays the text value in the address bar, but it doesn't show the button's value as a GET param at all... does that mean it's not submitting it?</p>
  
  <hr>
  
  <p>I can't use hidden inputs because I need to determine which button is clicked without JS.</p>
  
  <hr>
  
  <p>Test 2:</p>
  
  <pre><code>&lt;form method="get" action=""&gt;
      &lt;input type="text" name="txt"/&gt;
      &lt;button type="submit" name="submit1" value="submit1"&gt;submit&lt;/button&gt;
      &lt;input type="submit" name="submit2" value="submit2"/&gt;
      &lt;input type="submit" name="submit3" value="submit3"/&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>In IE8, hitting enter does not submit any of the buttons, but clicking submit1 <em>will</em> send a value. It'll send "submit", not "submit1" which is inconsistent with FF. However, submitting the form only sends the value of <em>one</em> button in both browsers, which means I might be able to check <em>which</em> button was clicked by checking if <code>GET['submitX']</code> exists instead!  Chrome has slightly different behavior on pressing enter (submits button2). Opera seems consistent with FF... but all 4 browsers only ever submit one button. I don't have any earlier versions of the browsers installed though.... does anyone know if it works in earlier versions, particularly IE6?</p>