w jaki sposob moge wyciagnac informacje na temat szerokosci i wysokosci obrazka w chrome (w ff dziala) bo opcja document.getElementById("fotka").height; i document.getElementById("focia").width; to odpada

dzieki za odpowiedz
Łukasz
<html> <head> </head> <body> <div id="box"> <img src="abc.jpg" alt="tresc"> </div> <script type="text/javascript"> if (document.images) { //sprawdzamy czy przeglądarka obsługuje obiekty images els = document.getElementById('box').getElementsByTagName('img'); for( i=0; el = els[i++];){ if( el.width >=450 && el.height >=150 ){ var ok=1;} } </script> </body> </html>
<html> <head> </head> <body> <div id="box"> <img src="abc.jpg" alt="tresc"> </div> <script type="text/javascript"> onload = function(){ els = document.getElementById('box').getElementsByTagName('img'); for( i=0; el = els[i++];){ //tu el.width powinno działać wszędzie <------------------------------------- if( el.width >=450 && el.height >=150 ){ //.... } else { //.... } } } </script> </body> </html>
<html> <head> </head> <body> <div id="box"> <img src="http://www.google.pl/logos/classicplus.png" alt="tresc"> </div> <script type="text/javascript"> onload = function(){ els = document.getElementById('box').getElementsByTagName('img'); for( i=0; el = els[i++];){ //tu el.width powinno działać wszędzie <------------------------------------- if( el.width >=50 && el.height >=50 ){ var ok=1; } else { } } } function ukryj() { document.getElementById("reklama").style.visibility = "hidden"; } </script> </body> </html>
<html> <head> </head> <body> <div id="box"> <img src="http://www.google.pl/logos/classicplus.png" alt="tresc"> </div> <script type="text/javascript"> onload = function(){ els = document.getElementById('box').getElementsByTagName('img'); for( i=0; el = els[i++];){ document.write(el.width); } } </script> </body> </html>