Warning: file_get_contents(/data/phpspider/zhask/data//catemap/0/svn/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 导出对word作出反应-超链接以放置在同一文档中_Javascript_Reactjs_Ms Word_Export - Fatal编程技术网

Javascript 导出对word作出反应-超链接以放置在同一文档中

Javascript 导出对word作出反应-超链接以放置在同一文档中,javascript,reactjs,ms-word,export,Javascript,Reactjs,Ms Word,Export,我用简单的js代码创建了word文件,将其转换为html并下载 让HTMLContent=exportToWord(模拟器,选项); const dir=“ltr”; const docTitle=simulator.name; 常数头= ` ` + ` ${docTitle}`; const footer=“”; const sourceHTML=`${header}${HTMLContent}${footer}`; const source=`data:application/vnd.ms-

我用简单的js代码创建了word文件,将其转换为html并下载

让HTMLContent=exportToWord(模拟器,选项);
const dir=“ltr”;
const docTitle=simulator.name;
常数头=
` ` +
`
${docTitle}`;
const footer=“”;
const sourceHTML=`${header}${HTMLContent}${footer}`;
const source=`data:application/vnd.ms-word;字符集=utf-8,${encodeURIComponent(
源HTML
)}`;
const fileDownload=document.createElement(“a”);
document.body.appendChild(文件下载);
fileDownload.href=source;
fileDownload.download=`${docTitle}.doc`;
文件下载。单击();
document.body.removeChild(文件下载);
文件已创建,一切正常。 问题是我想在文件中创建指向word文档中其他位置的链接 我怎么做