When I use method click()
to click the button, the submission failed.
But, when I use the mouse to click the button on that webpage, (the submit form is same) it works.
HTML file:
<button xmlns="http://www.w3.org/1999/xhtml" class="ui-button button1" type="submit" id="create">
<span>
<span>Create</span>
</span>
</button>
My userscript file:
document.getElementById("create").click();
How do I click the button using HTML DOM click()?