开发者

Is there a way to do OR in jQuery selectors

开发者 https://www.devze.com 2023-01-30 11:40 出处:网络
for example, something like... // get everything that is either an input or a select $container.find(\':any(inp开发者_开发知识库ut, select)\');

for example, something like...

// get everything that is either an input or a select
$container.find(':any(inp开发者_开发知识库ut, select)'); 


What about

$container.find('input, select'); 


You can use :input selector

$containder.find(":input")

which selects all input, textarea, select and button elements.

0

精彩评论

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