jQuery选中所有input和textarea,但不包含button的方法

前端开发jQuery 390
var inputs = $('input, textarea, select')
                .not(':input[type=button], :input[type=submit], :input[type=reset]');

$(inputs).each(function() {
    console.log(this.type);
});

Post Comment