开发者

Filtering By More Than One Attribute in JQuery

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

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜