jQuery遍历Form示例代码

jQuery 遍历 Form,代码如下

jQuery遍历Form示例代码

复制代码 代码如下:

// 取得 id 为form1 的' form 的所有输入变量

values = $("#form1")alizeArray();

var values, index;

for (index = 0; index < th; ++index)

{

if (values[index] == "textfield2")

{

// 改变 form 中指定 input 的值

values[index]e = "hello";

}

}