Überblick
Formulare gibt eine Sammlung (ein HTMLCollection -Objekt) zurück, das alle Formularelemente im aktuellen Dokument enthält.
Grammatik
var collection = document.forms;
Beispiel
Formularinformationen erhalten
<script type = "text/javaScript"> $ (function () {var thesform = document.forms ['Form1']; // Das Formularformular mit Name Form1 // oder // var thesform = document.Forms [0]; // Erhalten Sie den ersten Formular Formular Konsole.info (thisform.username.value); // Ausgabe des Usernamen -Wertes mit Formname -Nennwert. console.info (thisform.address.Value); value = "pejing"/> </form> <form action = "x" name = "Form2"> </form> <form action = "x" name = "Form3"> </form> </body>