Submit.type : submit button : Form JAVASCRIPT TUTORIALS


JAVASCRIPT TUTORIALS » Form » submit button »

 

Submit.type








The type property returns the type of the text box.

This always returns submit.












<html>
    <head>
    <script language="JavaScript1.1">
    <!--
    function getType(){
      alert("The name of this submit button is " + document.myForm.elements[1].type);
    }
    -->
    </script>
    </head>
    <body>
    <form name="myForm">
      <input type=TEXT value="First Box" name="myText">
      <input type=SUBMIT value="Submit" name="mySubmit" onClick='getType()'>
    </form>
    </body>
    </html>







HTML code for linking to this page:

Follow Navioo On Twitter

JAVASCRIPT TUTORIALS

 Navioo Form
» submit button