var form = document.getElementById("form-id"); document.getElementById("your-id").addEventListener("click", function () { form.submit(); });