title: Multiple Submit buttons in HTML form
body: <p>I am trying to put multiple buttons on single form.
  Based on submit button, I want to process different action to form</p>
  
  <pre><code>&lt;script type="text/javascript"&gt;
      $("#&lt;portlet:namespace/&gt;Form").submit(function(e) {
          //alert("test");
              var action = ???
          if (action == 'Add') {
              alert("add");
          } else if (action == 'Edit') {
              alert("edit");
          } else if (action ==  'Delete') {
              alert("delete");
          } else{
              alert("error");
          }
      });
  &lt;/script&gt;
  
  
  &lt;form name="&lt;portlet:namespace/&gt;Form" method="POST"&gt;
      &lt;table&gt;
          &lt;tr&gt;
              &lt;td&gt;&lt;input type="submit" name="action" value="Add"&gt;&lt;/input&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="submit" name="action" value="Edit"&gt;&lt;/input&gt;&lt;/td&gt;
              &lt;td&gt;&lt;input type="submit" name="action" value="Delete"&gt;&lt;/input&gt;&lt;/td&gt;
          &lt;/tr&gt;
      &lt;/table&gt;
  &lt;/form&gt;
  </code></pre>
  
  <p>How do I get which button triggered the submission of form?</p>