嘿,我正试图设置它,以便它将拉出使用价值,继承代码.
<tr class="data-point"> <th class="x-value" data-value="1391212800" data-label="Feb" data-description="February 2014"> February 2014 </th> <td class="y-value" data-value="164" data-tooltip-name="usage" data-tooltip-index="2" data-series="runtime" data-description="164 hours"> 164 hours </td> <td class="y-value" data-value="16.0" data-tooltip-name="usage" data-tooltip-index="1" data-series="savings" data-description="16 hours"> 16 hours </td> </tr>
所以我需要提取并设置为变量(useage)data-series =“runtime”的数据值
最终结果应为:useage = 164