自己琢磨出来了,贴上来,希望版主给赞- var data=Forguncy.Page.getCell("code").getValue();
- var Fname = Forguncy.Page.getCell("ID").getValue();
- var name = Fname + 'cn.htm';
- var element = document.createElement('a');
- element.setAttribute('href', 'data:text/plain;charset=utf-8,' +encodeURIComponent(data));
- element.setAttribute('download', name);
- element.style.display = 'none';
- document.body.appendChild(element);
-
- element.click();
-
- document.body.removeChild(element);
复制代码 |