Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$('.field[id^=stat_]') $('.field[value!=""]')
是否可以将这些组合成一行?
你可以试试:$('.field[id^=stat_][value!=""]')
$('.field[id^=stat_][value!=""]')
像这样尝试,这将完成你的工作
$('.field[id^=stat_][value!=""]');
有可能的:
另请参阅:jquery.com - 多属性选择器 工作示例:http: //jsbin.com/ugafam/1/
当然!