How to submit a form automatically on page load?

How to submit a form automatically on page load?

Team Leader Asked on June 15, 2017 in JAVASCRIPT.
Add Comment
1 Answer(s)
<form id="f1" name="f1" action="" method="post">

<input type="text" id="name" name="name" value="test" />

<input type="text" id="email" name="email" value="test@gmail.com" />

</form>
<script type="text/javascript">

jQuery(document).ready(function($) {

$("f1").submit();

});

</script>
IT Head Answered on June 15, 2017.
Add Comment

Your Answer

By posting your answer, you agree to the privacy policy and terms of service.