1
<script type="text/javascript" src="raphael.js"></script>
<script>
var paper = new Raphael("holder", 320, 200);
function testPaper(){
var width10 = paper.width * 0.1;
var height10 = paper.height * 0.1;
var width80 = paper.width * 0.8;
var height80 = paper.height * 0.8
var c = paper.rect(width10, height10, width80, height80, Math.min(width10, height10));
}
</script>
</head>
<body onload = "testPaper()">
<div id="holder"></div>
</body>
위의 코드에 어떤 문제가 있습니까?어떻게하면 Raphael.js를 시작할 수 있습니까?
Uncaught TypeError: Cannot read property 'x' of undefined raphael.js:11
감사합니다! 위의 코드를 수정했지만 여전히 동일한 오류가 발생합니다. 이견있는 사람? – Jackalope
좋습니다, 제가 제안한 것들 중 * 두 가지 *를 모두 구현 한 후에 작동하기 시작했습니다. 감사! – Jackalope
@Jackalope Cool! 이제 재미있는 것들에! – user2864740