<form id="editForm" onsubmit="return false" >
<tr>
<input type="button">查询</input>
<input type="button">重置</input>
</tr>
<tr>
<td>
<input type="radio" name="radio1" value="1">是</input>
<input type="radio" name="radio1" value="0">否</input>
</td>
</tr>
<tr>
<select><option></option></select>
</tr>
</form>
清除表单中除了button外的选项的值:
function clears(){
var eles = jq("#editForm :input :gt(1)");
for(var i = 0; i < eles.length; i++){
ele = eles[i];
ele.value = "";
}
}
博客介绍了使用JavaScript清除表单中除button外选项的值的相关内容,聚焦于利用JavaScript对表单元素进行操作,以实现特定的清除功能。
172

被折叠的 条评论
为什么被折叠?



