<html> <body> <form name="Form1"></form> <form name="Form2"></form> <form name="Form3"></form> <script type="text/javascript"> document.write("This document contains: " + document.forms.length + " forms."); </script> </body> </html>
Your Result:
Edit the code above and click to see the result.
W3Schools.com
- Try it yourself