Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Issues with submit button

Is there any difference between these two ways:

1) <form name=form> <input type=submit > </form>

2) document.form.submit();

Does it send any interrupts by clicking on submit button or by javascript.
Kindly let me know the major differences between these two ways of submit

like image 463
user1710675 Avatar asked Jul 19 '26 18:07

user1710675


1 Answers

When you submit with a submit button it will send the name of the submit button to the server, it can't happen if you submit with javascript.

Besides of this, I don't think there is a difference.

like image 91
gdoron is supporting Monica Avatar answered Jul 22 '26 07:07

gdoron is supporting Monica



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!