1
我试图动态创建这个函数:试图通过字符串函数参数为SVG
svg.path($('#shape23'),
path.move(333,410)
.smoothC(333,410,333,410)
.smoothC(217.5,415.75,217.5,415.75)
.smoothC(333,500,333,500)
.close(), {fill: '#CCCCCC'});
...与第二个参数变量值(从path.move关闭()) :
var myPath = 'path.move(333,410)';
myPath += '.smoothC(333,410,333,410)';
myPath += '.smoothC(217.5,415.75,217.5,415.75)';
myPath += '.smoothC(333,500,333,500)';
myPath += '.close()';
svg.path($('#shape23'), myPath, {fill: '#CCCCCC'});
...但我得到一个解析错误。
任何人都可以帮我撕下我的头发吗?
天才,谢谢你! – Mogstar 2012-01-17 18:28:32