为什么要输入拉斐尔所需的输入字段?

时间:2014-03-13 14:23:06

标签: javascript jquery raphael graphael

为什么要输入拉斐尔所需的输入字段? 我刚刚用另一个鼓舞人心的代码构建了Raphael动画。自定义代码运行良好,但遗憾的是代码在没有输入字段的情况下无法正常工作。

<input type="text" value="70" id="radius12">
<input type="text" value="#fff" id="color">

DEMO http://jsfiddle.net/V54hR/ 有没有人知道为什么有必要呢?

1 个答案:

答案 0 :(得分:1)

您的代码中有小错字,Raphael不需要输入字段。当你给<input type="text" value="#fff" id="color">时,这个Raphael假定颜色变量作为你的输入字段

colour = "#000",

将此代码更改为

color = "#000",

更新了fiddle