开发者

Image width on Safari with Prototype

I am working with javascript and i want to get an image width with prototype. I did :

 lastElement.down('img').width

It working on firefox but Safari ruturn 0. An开发者_开发知识库yone can help me?


lastElement.down('img').getWidth()

If you just access someimg.width what you're getting is the width attribute on the img-tag itself, which may not be set.

See Prototype's docs for more

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜