代码如下:
$("#formId :input").not(":button, :submit, :reset, :hidden")
.val("").removeAttr("checked").remove("selected");
不需要遍历表单中每个元素单独清空了