用于下一个未聚焦输入的jQuery选择器(jQuery selector for next unfocused input)

编程入门 行业动态 更新时间:2024-10-11 23:24:53
用于下一个未聚焦输入的jQuery选择器(jQuery selector for next unfocused input)

我在段落中有一个输入元素$myInput = $('#someInput') 。 我想在该段中找到未聚焦的下一个输入元素。

我试过$myInput.next('input(:not(:focus))')但这似乎不起作用。

I have an input element $myInput = $('#someInput') within a paragraph. I would like to find the next input element in that paragraph which is unfocused.

I have tried $myInput.next('input(:not(:focus))') but this doesn't seem to work.

最满意答案

$myInput = $('input');

接着

$myInput.nextAll('input').not(':focus').eq(0); $myInput = $('input');

and then

$myInput.nextAll('input').not(':focus').eq(0);

更多推荐

本文发布于:2023-08-03 07:33:00,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1385404.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:选择器   jQuery   selector   input   unfocused

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!