gpt4 book ai didi

javascript - Uncaught ReferenceError : CodeMirror is not defined

转载 作者:搜寻专家 更新时间:2023-11-01 05:24:57 31 4
gpt4 key购买 nike

我正在尝试包含 CodeMirror 插件,但出现此错误未捕获的 ReferenceError:未定义 CodeMirror

我的 HTML 代码在这里

http://pastie.org/4673008

有人可以帮忙吗??

提前致谢..

最佳答案

您将在 CodeMirror 本身之前加载 clike 模块。

从此更改 HTML 头部中的顺序:

<script type="text/javascript" src="../CodeMirror-2.33/mode/clike/clike.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/lib/codemirror.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/mode/javascript/javascript.js"></script>

对此:

<script type="text/javascript" src="../CodeMirror-2.33/lib/codemirror.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/mode/clike/clike.js"></script>
<script type="text/javascript" src="../CodeMirror-2.33/mode/javascript/javascript.js"></script>

关于javascript - Uncaught ReferenceError : CodeMirror is not defined,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12297080/

31 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com