function clearForm(oForm){ var els = oForm.elements; //遍历所有表元素 for(var i=0;i<els.length;i++) els[i].value="";}