jQuery“非只读”选择器
我正在寻找类似的东西......
$(':input:not(readonly)') // all inputs which are not readonly
但很难找到语法。
有什么指点吗?谢谢
I'm looking for something along the lines of...
$(':input:not(readonly)') // all inputs which are not readonly
but struggling to find the syntax.
Any pointers? thanks
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
这应该有效:
This should work:
将涵盖 readonly、readonly="true" 和 readonly="readonly"
would cover readonly, readonly="true" and readonly="readonly"
我最近做了类似的事情:
I recently did something similar like this:
我想您正在寻找类似以下内容:
看看 jQuery 的各种 attribute-selectors。
I suppose you are looking for something like the following:
Have a look at jQuery's various attribute-selectors.
我想使用上下文添加另一个适合我的答案 https://api.jquery.com/context /
I would like to add another answer that works for me, using context https://api.jquery.com/context/