<form id= "myForm" action= "doMySubmission.php" >
<input type= "submit" value= "Submit"/>
/ / For Google Chrome
/ / For IE and Firefox
While a more realistic scenario is to write a function that changed the form action based on the input the user gave, the example shows the principle.
Before Google Chrome, I referenced the action with just a straight myForm.action = 'newAction' but Chrome seems to be flaky in honoring that syntax. Adding the extra property level of .value makes the syntax work well in Chrome; it does not work in the other browsers I have tested so far... so you have to write the code for Chrome and other browsers separately.