如何获得所有输入除了按钮和隐藏字段与jquery? [英] how can i get all inputs excluding buttons and hidden fields with jquery?

查看:158
本文介绍了如何获得所有输入除了按钮和隐藏字段与jquery?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下将排除所有按钮,但如何也可以排除隐藏字段?

I've got the following which will excludes all buttons, but how can I also exclude hidden fields?

$("#selector").find(":input:not(:button)").each(function (i) { // do something

我相信这可能很简单,我只是找不到。

I'm sure this is probably simple, I just can't find it.

非常感谢!

推荐答案

以下代码应该这样做。

$('#selector :input').not(':button,:hidden').each(...);

这篇关于如何获得所有输入除了按钮和隐藏字段与jquery?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆