JSFiddle - React, Tailwind, and code Playground
by tomloprod
HTML
<form action="/" method="post" name="form" id="form">
<button id="changeButton">Change</button>
</form>
JavaScript
document.getElementById("changeButton").addEventListener("click", save);
function save(){
document.form.action = "/abc.php?mode=save";
alert(document.form.action);
document.form.submit();
}