开发者

Filtering By More Than One Attribute in JQuery

开发者 https://www.devze.com 2022-12-08 16:15 出处:网络
I am just wondering whether that is a correct syntax in JQuery : var elements = $(\"#contact-area input[type=text,value=something] \").get();

I am just wondering whether that is a correct syntax in JQuery :

var elements = $("#contact-area input[type=text,value=something] ").get(); 

What I mean is how 开发者_StackOverflowto write specify more than one parameter to and filter apart from this use :

$("#contact-area (input[type=text],input[value=something])").get();


put each attribute in it's own [] (no spaces in between attributes).

var elements = $("#contact-area input[type=text][value=something] ").get();

or

var elements = $("#contact-area input:text[value=something] ").get();
0

精彩评论

暂无评论...
验证码 换一张
取 消