<html>
<body>
<script language="JavaScript">
function showNumElements(){
console.log("There are " + document.form1.length + " elements in this document");
}
</script>
<form name="form1">
Enter First Name:
<input type="text" size=15><br>
Enter Last Name:
<input type="text" size=20><br>
Enter address:
<input type="text" size=40><br><br>
<input type="button" value="Submit" onClick=showNumElements()>
</form>
</body>
</html>