jquery 清空表达内容

function clearForm(objE) {
    $(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;
            }
        }
    );
}
clearForm("表单");
原文地址:https://www.cnblogs.com/objectboy/p/4062506.html