javascript - Get image width and height -
I need the dimensions of an image in javascript when no style is specified for it (jQuery CSS () returns 0).
Probably this is because I am loading the image with jQuery before asking for my dimensions. If this is the case, then is there any such incident that says to hear that the image is full?
The image may not be fully loaded so the dimension can not be given. But without your code I can not tell what you are doing, but this is an example that will work:
Function Load Image (ISRC) { Var oImg = new image (); OImg.src = isrc; If (omegle complex) {window.alert (oImg.src + '' + oImg.width + 'x' + oImg.height); } And (window.setTimeout ('iLoad (imgsrc)', 1000);}} & lt; body onLoad = 'LoadImage (imgsrc)' & gt;
Comments
Post a Comment