This article mainly introduces how to implement multi-button form submission action in js. For more information, see the previous article about how to implement multi-button form submission action in php, today, I will introduce a processing method for implementing the multi-button action submission of forms in js, hoping to help you.
Use JS to implement multiple buttons in a form, and process two onclick events. the code is as follows:
Script function submitit1 () // process by Program 1 {document. myForm. action = "http://www.site.com/cgi1.php" document. myForm. submit ();} function submitit2 () // process by program 2 {document. myForm. action = "http://www.site.com/cgi2.php" document. myForm. submit ();} script
You can learn from the previous article "how to handle multiple buttons for submitting actions in a php form", which may bring better results.