top button
Flag Notify
    Connect to us
      Site Registration

Site Registration

How can I submit a form without using any submit button?

+1 vote
377 views
How can I submit a form without using any submit button?
posted Nov 26, 2015 by anonymous

Share this question
Facebook Share Button Twitter Share Button LinkedIn Share Button

1 Answer

+1 vote

Yes.
You can submit a form with one line of JavaScript, no submit button needed:

submit using script, for example

window.onload=function() {
  document.getElementById("form1").submit(); // using ID
}

or in jQuery:

$(function() {
  $("#form1").submit(); // using ID
});
answer Nov 27, 2015 by Shivaranjini
...