Posts Form Submit Buttons That Go To Different URLs
Post
Cancel

Form Submit Buttons That Go To Different URLs

1
2
3
4
5
6
<form name="form">

  <input type="submit" onclick="javascript: form.action='/submit';">
  <input type="submit" onclick="javascript: form.action='/submit-2';"> 

</form>	
1
2
3
4
5
6
7
<form action="/submit">

  <input type="submit" value="Submit">

  <input type="submit" value="Go Elsewhere" formaction="/elsewhere">

</form>

src - https://css-tricks.com/separate-form-submit-buttons-go-different-urls/ https://www.w3schools.com/Tags/att_button_formaction.asp

origin - http://www.pipiscrew.com/?p=9622 form-submit-buttons-that-go-to-different-urls

This post is licensed under CC BY 4.0 by the author.
Contents

Trending Tags