我的代码:
<script src="https://ajax.googleapis.com/ajax/libs/jquery/2.1.1/jquery.min.js"></script>
<div class="poly-items__price">
<span>do not change change</span>
</div>
控制台:// node = "<a href="blob:http%3A//..." download="export.csv"></a>"
var event = new MouseEvent("click");
node.dispatchEvent(event);
该错误仅出现在Firefox中(Chrome和IE工作正常) 为什么dispatchEvent没有被解雇?
编辑: fileSaver.js-代码:
Chrome:node.dispatchEvent is not a function
Firefox:save_link=<a href="blob:http%3A//...efa07" download="export.csv"></a>
save_link="<a href="blob:http%3A//...efa07" download="export.csv"></a>"