In javascript, you can get the width and height for an image like this:
w=document.images
.width;
h=document.images
.height;
This works with netscape 3+ and IE 4+
You can't get these attributes before the document loads with client-side scripting. However, you can retrieve them in the onLoad event. If you _really_ need to know before the document loads, it can be done with server-side scripting.
thanx but this is not really what i want to do see
what i want is to preload images in an array using new Image
and id like to put the size in new Image(x,y) so that it can do changes to the page faster
now if this does not matter at all when you're using new image please inform me cause i know it does when u use <IMG>
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.