Actually, when we want this, we want to change the action depending on which submit button we press.
Here you do not need even assign name
or id
to the form. Just use the form
property of the clicked element:
<form action = "/default/page" >
<input type=submit onclick='this.form.action="/this/page";' value="Save">
<input type=submit onclick='this.form.action="/that/page";' value="Cancel">
</form>