Answers for "How can I set the form action through JavaScript?"

0

How can I set the form action through JavaScript?

//Set your form action
document.getElementById('myFormId').action="./myPage.myLanguage"

//display on console your form action
connsole.log(document.getElementById('myFormId').action)

//retrive the action from a selected Form
document.getElementById('myFormId').action
Posted by: Guest on July-06-2021
0

html form action javascript

<!-- use onsubmit -->
<form onsubmit="return yourJavaScript(this)">
  <div>
    <label>Name:</label>
    <input id="name" name="name" type="text">
  </div>
  <div>
    <label>Email:</label>
    <input id="email" name="email" type="email">
  </div>
  <div>
    <input id="submit" type="submit">
  </div>
</form>
Posted by: Guest on June-11-2021

Code answers related to "How can I set the form action through JavaScript?"

Code answers related to "Javascript"

Browse Popular Code Answers by Language