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
精彩评论