Edit This Code:
<!DOCTYPE html>
<html>
<body>

<form action="">
First name: <input type="text" name="fname" value="Donald">
<input type="submit" value="Submit">
</form>

<p id="demo"></p>

<script>
document.getElementById("demo").innerHTML =
"Number of forms: " + document.forms.length;
</script>

</body>
</html>


Result:
Try it Yourself - © w3schools.com
Privacy Policy