这小段代码是http://www.hewebgl.com/articl...中的因为函数中 width 和 height 没有用 var 声明,隐式泄漏为全局变量 而且接下来的函数还要用到width和height,所以我就把它们放到函数体外,但是这两句挪出函数体外显示的效果就失败了(代码为了绘制一条线)FireBug的报错:Error in parsing value for ‘width’. Declaration dropped. Error in parsing value for ‘height’. Declaration dropped.
添加回答
举报
0/150
提交
取消