开发者

with jquery, how would i get get all hidden input within an html table "mytable" that has class= "updatable"

开发者 https://www.devze.com 2022-12-15 12:53 出处:网络
question in subject . . basically i see that i can do this to get all hidden elements var input = $(#mytable:hidden);

question in subject . .

basically i see that i can do this to get all hidden elements

var input = $(#mytable:hidden);

but i can't seem to do something like this:

var input = $(#mytable:hidden:input.updatable);

is 开发者_开发百科there a way to have multiple criteria in a selector


Try this.

var input = $("#mytable input.updatable:hidden");

Alternatively, you can specify a "context" to search within. This should have the same result as the example above, just another way to do it.

var table = $("#mytable");
var input = $("input.updatable:hidden", table);
0

精彩评论

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