http://blog.csdn.net/ajun_studio/article/details/6637229
function clearForm(objE){//objE为form表单 $(objE).find(':input').each( function(){ switch(this.type){ case 'passsword': case 'select-multiple': case 'select-one': case 'text': case 'textarea': $(this).val(''); break; case 'checkbox': case 'radio': this.checked = false; } } ); }