开发者

Get an array of forms in java script using prototype

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.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜