Friday, January 4, 2013

Name of the form in an HTML file



Name of the form in an HTML file ::

<!DOCTYPE html>
<html>
<body>

<form name="Form1"></form>
<form name="Form2"></form>
<form></form>

<p>Name of first form:
<script>
document.write(document.forms[0].name);
</script></p>

</body>
</html>

o/p:

Name of first form: Form1

No comments:

Post a Comment