标签: javascript document.evaluate
以下代码在google chrome中完美运行,但在firefox中它返回一个空数组。
var spans = document.evaluate( ".//span[contains(@class, '_GAmD') and not(contains(@class, '_GAe'))]/text()", document, null, XPathResult.ORDERED_NODE_SNAPSHOT_TYPE , null);