如代码function(dx, dy){ rect.attr({x: orig_x+dx,y: orig_y+dy, fill:"orange"});
},function(x,y){
orig_x=+rect.attr("x");
orig_y=+rect.attr("y"); rect.attr({fill:"orange"});
},function(){ rect.attr({fill:"blue"});
}
1 回答

慕姐8265434
TA贡献1813条经验 获得超2个赞
其实这个并不是 =+
, 只是+
, 然后赋值。
+
表示试图将后面的变量变成整数,比如
+'3' = 3+'a' = NaN
一般作用就是用来把用户输入的字符串转换成整数
添加回答
举报
0/150
提交
取消