<form id="form1" name="form1" method="post">
...
</form>
function f(){
document.form1.method="post";
document.form1.submit();
}
I've tried these methods, but all failed:
1.
change method f:
document.form1.method="post";
document.form1.submit(function(e) {
e.preventDefault();
});
failed.
2.
change form element:
<form id="form1" name="form1" method="post" onclick="return false" onsubmit="return false">
...
</from>
failed.
Is there any way to prevent submitting refreshing the page where the form is?
Thanks a lot.