javascript 拉斐尔未定义

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/20071936/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-10-27 17:38:00  来源:igfitidea点击:

Raphael is not defined

javascriptraphael

提问by Alan

my html code look like this

我的 html 代码看起来像这样

<script src="js/raphael/raphael.js"></script>
<script src="js/raphael/g.raphael.js"></script>
<script src="js/raphael/g.bar.js"></script>

But my developer tool says

但我的开发者工具说

Uncaught ReferenceError: Raphael is not defined g.raphael.js:7

Uncaught ReferenceError: Raphael is not defined g.bar.js:19

未捕获的 ReferenceError:未定义 Raphael g.raphael.js:7

未捕获的 ReferenceError:未定义 Raphael g.bar.js:19

when i load the page and look at the developer console

当我加载页面并查看开发者控制台时

I have offcourse downloaded all the files and placed them in the shown locations.

我已经offcourse下载了所有文件并将它们放置在显示的位置。

What am i doing wrong?

我究竟做错了什么?

回答by Pinal

It means that js/raphael/raphael.jsis not valid path.

这意味着那js/raphael/raphael.js不是有效的路径。

回答by Christian Kahlau

Got the same problem with an XPagesapproach under Domino Server.

XPages下的方法遇到了同样的问题Domino Server

Found out that Dojo Toolkit- which automatically gets added to every XPage - is not compatible with Raphael.

发现Dojo Toolkit- 它会自动添加到每个 XPage - 与Raphael.

Removed Dojofrom the page, used jQueryinstead - everything fine.

Dojo从页面中删除,jQuery改为使用- 一切正常。

回答by UdayKiran Pulipati

Paste these filesraphael.js, g.raphael.js, g.bar.jswhere your html/jsp files reside.

这些文件粘贴raphael.jsg.raphael.jsg.bar.js在您的HTML / JSP文件驻留

You will get ride of ReferenceError: Raphael is not definedthis problem.

你会解决ReferenceError: Raphael is not defined这个问题。