简体   繁体   English

添加到 HTML 脚本括号的 JavaScript 行使错误 500

[英]JavaScript line added to HTML script bracket make error 500

i have an issue with a webpage that produce error 500 after adding the following line :添加以下行后,我的网页出现错误 500 的问题:

discordInvite.init({inviteCode: 'sK5R76jTmu'});

inside the script bracket :在脚本括号内:

<script src="./discordInvite.js"></script>
<script type="text/javascript">
discordInvite.init({inviteCode: 'sK5R76jTmu'});
discordInvite.render();
</script>

The page work fine without that line only and, if i juste type the commande in consol (chrome consol), the page render the results (typing the script in the order init + render).页面在没有该行的情况下工作正常,如果我只是在控制台(chrome consol)中键入命令,页面将呈现结果(按 init + 呈现的顺序键入脚本)。

For more details about the JS script, here is a link to the original git page : https://github.com/Aegis7Gaming/Discord-Invite-JS-HTML-CSS有关 JS 脚本的更多详细信息,这里是原始 git 页面的链接: https : //github.com/Aegis7Gaming/Discord-Invite-JS-HTML-CSS

and here is the page i'm trying to implement this on : http://www.ats.rf.gd/ (part of the script is in the end of the body)这是我正在尝试实现的页面: http : //www.ats.rf.gd/ (脚本的一部分在正文的末尾)

thanks in advance for your help i can't understand the logic behind it.在此先感谢您的帮助,我无法理解其背后的逻辑。

I solved the issue by replacing我通过替换解决了这个问题

discordInvite.init({inviteCode: 'sK5R76jTmu'});

by经过

discordInvite.init({inviteCode: "sK5R76jTmu"});

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM