Submit.form : submit button « Form « JavaScript Tutorial






The form property provides access to all the data of the form in which the submit button is located.

<html>
    <head>
    <script language="JavaScript">
    <!--
    function openWin(){
      var formData = document.myForm.mySubmit.form;
      var myWin = open("", "","width=450,height=200");

      myWin.document.write("The name of the form is: " + formData.name + "<br>");
      myWin.document.write(formData.myText.value + "<br>");
      myWin.document.write(formData.elements[1].name + "<br>");
      myWin.document.close();
    }
    -->
    </script>
    </head>
    <body>
    <form name="myForm">
      <input type=TEXT value="Hello, World!" name="myText">
      <input type=BUTTON value="Click to Process" name="mySubmit" onClick="openWin()">
    </form>
    </body>
    </html>








10.26.submit button
10.26.1.Submit
10.26.2.Submit.blur()
10.26.3.Submit.click()
10.26.4.Submit.focus()
10.26.5.Submit.form
10.26.6.Submit.handleEvent()
10.26.7.Submit.name
10.26.8.Submit.onBlur
10.26.9.Submit.onClick
10.26.10.Submit.onFocus
10.26.11.Submit.type
10.26.12.Submit.value
10.26.13.Return false in form button click event
10.26.14.Using Image as the submit button