1//Set your form action
2document.getElementById('myFormId').action="./myPage.myLanguage"
3
4//display on console your form action
5connsole.log(document.getElementById('myFormId').action)
6
7//retrive the action from a selected Form
8document.getElementById('myFormId').action
1<!-- use onsubmit -->
2<form onsubmit="return yourJavaScript(this)">
3 <div>
4 <label>Name:</label>
5 <input id="name" name="name" type="text">
6 </div>
7 <div>
8 <label>Email:</label>
9 <input id="email" name="email" type="email">
10 </div>
11 <div>
12 <input id="submit" type="submit">
13 </div>
14</form>