Form.name : Form Object : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » Form Object »

 

Form.name








The name property of the Form object represents the name of the form as specified in the HTML


tag.












<html>
    <head>
    <title>Access the name property of the Form object</title>
    </head>
    <body>
    <script language="JavaScript">
    <!--
    function showName(){
        alert("Form Name is: " + document.form1.name);
    }
    -->
    </script>
    <form name ="form1" >
    Dummy input text box.
    <input type= "text" size="15">
    <br><br>
    Click on the button to get the name of the form
    <input type="button" value="click me" onclick='showName()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» Form Object