为什么我的js文件的内容替换为html代码? [英] Why is the content of my js file replaced by html code?
本文介绍了为什么我的js文件的内容替换为html代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在尝试使用dcsubscriber.js中的函数:
I am trying to use functions in dcsubscriber.js:
但是,在运行网站时,dcsubscriber.js的内容已完全替换为一些奇怪的html代码:
However, when running the website, the content of dcsubscriber.js is replaced completely by some odd html code:
更新:
我使用管理面板从Markdown编辑器添加html代码
I use Admin panel to add html code from Markdown editor
推荐答案
您可以使用反应-头盔
将您的js文件放在静态文件夹中,然后像这样使用它们:
You can use react-helmet
Put your js file inside static folder and use them like this :
<Helmet>
<script crossorigin="anonymous" src="/test.js" />
</Helmet>
这篇关于为什么我的js文件的内容替换为html代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文