<button id="submit"></button>
const button = document.querySelector("#submit"); //trigger click button.dispatchEvent(new Event("click"));