开发者

why can't I assign properties to a new Image object?

foo = new Image()
foo.x = 500
foo.x => 0开发者_开发问答


var image = new Image();
image.foo = 100;
alert(image.foo); 

works perfectly, you can't change x because it's predefined and has only a getter Method

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜