<script>
function saveFile (strData,filename) {
var save_link = document.createElement('a');
save_link.href =strData;
save_link.download = filename;
var event = new MouseEvent('click');
save_link.dispatchEvent(event); //自定义触发事件dispatchEvent
}
</script>