Form.submit() : Form Object : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Form Object »

 

Form.submit()








The submit method of the Form object is used to submit a form.

It operates the same as if a Submit button was clicked.












<html>
    <head>
    <title> Using the submit method for the Form object</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function submitForm(form){
        document.form1.submit(form);
    }
    -->
    </script>
    <form name= "form1" method="post" action="http://www.navioo.com">
    This is a sample form
    <br><br>
    Name:<input type="text" size="40" name="name">
    <br>
    Age:<input type="text" size="3" name="age">
    <br>
    Phone Number:<input type="text" size="10" name="phone">
    <br><br>
    <input type= "button" value="Submit" onclick = submitForm(this.form)>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Form Object