< form name ="myForm" method ="post" action ="" > < input type ="text" > < input type ="button" name ="b1" value ="b1" onclick ="submitform(b1)" > < input type ="button" name ="b2" value ="b2" onclick ="submitform(b2)" > </ form > < script > ... <!--function submitform(target)...{ window.document.myForm.action = target ; myForm.submit();}//--> </ script >