javascript submit a form with id
// 1. Acquire a reference to our <form>.
// This can also be done by setting <form name="blub" id="myAwsomeForm">:
// var form = document.forms.blub;
var form = document.getElementById("myAwsomeForm");
// 2. Get a reference to our preferred element (link/button, see below) and
// add an event listener for the "click" event.
document.getElementById("your-link-or-button-id").addEventListener("click", function () {
form.submit();
});
// 3. any site in your javascript code:
document.getElementById('myAwsomeForm').submit();
Also in JavaScript:
- javascript sort alphabetically
- ngingx proxy express get real ip
- node js callback
- comments in js
- jquery select self and siblings
- js key in dict
- nodejs format text
- javascript get the last element of an array
- how to check if item is in list js
- program to parenthesize an expression
- javascript go to previous page
- cypress memory leak
- popper js example
- https with express
- javascript for
- vuejs import component
- express js continous GET /json/version
- javaascript all
- document ready javascript vanilla
- how to check is the key of a localstorage is emopty
- npx create react app Must use import to load ES Module error
- javascript add update query parameter to url
- change checkbox jquery alert
- req.params.id in nodejs