How to use Event Submit() Method in JQuery

In this article I am going to explain about Event Submit() method in jquery.
  • 1651

jQuery Event Submit() Method

jquery event Submit() method refers to submit event. Submit event occurs when from submit. Submit() method only use with from elements.

Syntax

$(selectElement).select()

 

Example

 

<html>

<head>

    <script type="text/javascript" src="jquery.js"></script>

    <script type="text/javascript">

        $(document).ready(function () {

            $("form").submit(function (e) {

                alert("Your form has been submeeted");

            });

        });

    </script>

</head>

<body>

    <form name="input" action="" method="get">

    User Name

    <input type="text" name="User Name" value="User Name">

    <br />

    Password

    <input type="text" name="Password" value="Password">

    <br />

    <input type="submit" value="Submit">

    </form>

</body>

</html>

Output

submit.jpg

You may also want to read these related articles: here
 
Ask Your Question 
 
Got a programming related question? You may want to post your question here
 

Categories

More Articles

© 2019 DotNetHeaven. All rights reserved.