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/
当然!
我将一组 html 代码传递给 php 函数,目的是提取并返回它的子集。
这是传入数据的部分示例:
[0] => <div class="positionIs" style="float:right;width:181px;"> [1] => <table class="datab