我想要获取位于标签元素中的空数据类或未禁用类的数据。不幸的是,我没有尝试过的选择器,比如jQuery“:Not”选择器正在工作。简单的html dom只提取空类
我有这样的代码到目前为止是:
$element = $html->find('div .titleHeader label', 0);
在理想情况下将提取: 110出来的:
<label for="attribute76">
<input id="attribute76" class="jshide" type="radio" value="76" name="super_attribute[144]">
110
</label>
,而不是105出来的:
<label class="disabled" for="attribute75">
<span class="crossedStock"> </span>
<input id="attribute75" class="jshide" type="radio" disabled="disabled" value="75" name="super_attribute[144]">
105
</label>
'label [class ='']'? –
不幸的是,没有。 'label [class ='disabled']'确实给了我一个回报,但是例如:'label [class!='disabled']'也不起作用。 – WouterB
那里没有div,所以显然没有这个工作的机会。 – pguardiario