概述

forms 返回一个集合 (一个HTMLCollection对象),包含了了当前文档中的所有form元素.

语法
var collection = document.forms;

例子
获取表单信息


<body>
	<!-- 以下为三个简单的form表单  -->
	<form action="x" name="form1" >
		<input type="text" name="username" value="zhangsan" />
		<input type="text" name="address" value="beijing" />
	</form>

	<form action="x" name="form2" >
	</form>

	<form action="x" name="form3" >
	</form>
</body>




相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-10-23
  • 2021-07-11
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-27
  • 2022-12-23
  • 2021-12-28
  • 2022-03-10
相关资源
相似解决方案