My document contains more than one forms. How can I get an array of all forms using prototype?
<html>
<head></head>
<body&开发者_StackOverflow社区gt;
<form id="form1">
<!-- Other stuffs here -->
</form>
<form id="form2">
<!-- Other stuffs here -->
</form>
<form id="form3">
<!-- Other stuffs here -->
</form>
</body>
</html>
Using prototype:
$$('form')
You can use the document.forms
property.
精彩评论