开发者

Get an array of forms in java script using prototype

开发者 https://www.devze.com 2023-01-01 20:56 出处:网络
My document contains more than one forms. How can I get an array of all forms using prototype? <html>

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

精彩评论

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