首页 > 代码库 > jquery 清空表达内容

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("表单");

jquery 清空表达内容