Count forms in a document : Form Info : Form Control JAVASCRIPT DHTML TUTORIALS


JAVASCRIPT DHTML TUTORIALS » Form Control » Form Info »

 

Count forms in a document



<html>

<body>
    <form name="Form1">
        Name: <input type="text" size="20">
    </form>
    <form name="Form2">
        Age: <input type="text" size="3">
    </form>

<script type="text/javascript">

    txt="This document contains: " + document.forms.length + " forms."
    document.write(txt)

</script>

</body>

</html>


           
       



-

Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .

Follow Navioo On Twitter

JAVASCRIPT DHTML TUTORIALS

 Navioo Form Control
» Form Info