Raphael JavaScript显示一个空白页面

Raphael JavaScript显示一个空白页面,javascript,raphael,Javascript,Raphael,我是JavaScript图形编程新手,正在尝试Raphael库。我试图显示一个简单的圆圈,但只得到一个空白页。以下是源代码: <!DOCTYPE html> <html lang="en"> <head> <meta charset="utf-8"/> <title> Raphael JS Test </title> <script src="raphael.js"><

我是JavaScript图形编程新手,正在尝试Raphael库。我试图显示一个简单的圆圈,但只得到一个空白页。以下是源代码:

  <!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8"/>
    <title> Raphael JS Test </title>

        <script src="raphael.js"></script>
        <script>
            window.onload = function() {
                var p = Raphael(10, 10, 400, 400);
                p.circle(100, 100, 45);
            }
    </script>
</head>

<body>
</body>
</html>

拉斐尔JS试验
window.onload=函数(){
var p=拉斐尔(10,10,400,400);
p、 圆圈(100,100,45);
}

非常感谢您的帮助!谢谢

我认为圆圈出现在页面上,但它是白色的,白色背景上有白色笔划。你试过定颜色吗

// Sets the fill attribute of the circle to red (#f00)
circle.attr("fill", "#f00");


我只是尝试一下你的代码,它是有效的。您使用的是哪种导航器?控制台中没有任何错误吗?我正在使用Safari,在Web检查器中,错误是:ReferenceError:找不到变量:RaphaelIf Raphael未定义。我认为raphael.js的链接是错误的。
// Sets the stroke attribute of the circle to white
circle.attr("stroke", "#fff");