Jquery :输入选择器返回按钮,但:not([type=button])不';行不通

Jquery :输入选择器返回按钮,但:not([type=button])不';行不通,jquery,jquery-selectors,Jquery,Jquery Selectors,我正在组合选择器,以便仅选择html中的特定输入: $('.content_container :input[type=radio]:checked, .content_container :input:not([type=radio])') 问题是它还返回 我尝试添加以下内容: .content_container :input:not([type=button]) .content_container :button:not([type=button]) 我的选择器,但它仍然返回按钮。我

我正在组合选择器,以便仅选择html中的特定输入:

$('.content_container :input[type=radio]:checked, .content_container :input:not([type=radio])')
问题是它还返回

我尝试添加以下内容:

.content_container :input:not([type=button])
.content_container :button:not([type=button])

我的选择器,但它仍然返回按钮。我如何安排呢?

您需要在一个
:not()
中组合这两种类型


否则,带有
:not([type=radio])的选择器将返回所有其他类型的输入,包括按钮,带有
:not([type=button])的选择器将返回所有其他输入,包括收音机,因此当您将它们组合在一起时,可以同时获得收音机和按钮,不要同时排除这两种类型。

您需要在一个
:not()
中组合这两种类型


否则,带有
:not([type=radio])的选择器将返回所有其他类型的输入,包括按钮,带有
:not([type=button])的选择器将返回所有其他输入,包括收音机,因此当您将它们组合在一起时,您将同时获得收音机和按钮,而不是同时排除两者。

@Barmar我不知道这一点。谢谢我将删除我的评论。@Barmar我不知道。谢谢我将删除我的评论。
.content_container :input:not([type=radio],[type=button])