【发布时间】:2019-07-28 21:01:42
【问题描述】:
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1997.0</td>
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1997.0</td>
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1997.0</td>
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1997.0</td>
</tr><tr class='detail-hide'><td Class='result-name '>pmu: COMMITTED_PKT_BSB</td>
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1655.0</td>
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1836.0</td>
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1655.0</td>
<td Class='metric' title='Test gave a performance metric.' lastPassTag=''>1836.0</td>
我有一个像上面这样的 HTML 表格 我正在尝试根据应用于那里的数字的公式进行条件格式设置 我试过这个:
var tb = document.getElementByClass('metric')
我无法获得这些值 任何修改或建议表示赞赏 谢谢
【问题讨论】:
-
document.getElementsByClassName("metric")
标签: javascript html arrays string