Multiple actions on one form

By using form tag we can define a action where we can submit the data and proceed further.
Now there are multiple submit button on the form and each required different action. So how to do that?
I found one easy solution for the this.

.....

function [...]