简体   繁体   English

JQuery结合了属性选择器

[英]JQuery combine attribute selectors

I have a Javascript that I am working on and I would like to combine two selectors so that they refer to this tag only: 我有一个Javascript,我正在努力,我想结合两个选择器,以便他们只引用这个标签:

<input name="checkable" type="checkbox">

So that only checkable with type checkbox will react to it while a text-field with a name of checkable will not. 因此,只有checkable with type复选框才能对它做出反应,而名称为checkable的文本字段则不会。 I have tried: 我试过了:

$("input[name='checkable' type='checkbox']")

with no success. 没有成功。 Any ideas on how I can do this? 有关如何做到这一点的任何想法?

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM