document.write("文档包含: " + document.forms.length + " 个表单。")
<form name="Form1"></form> <form name="Form2"></form> <form name="Form3"></form>