Mega Code Archive

 
Categories / JavaScript DHTML / HTML
 

Image width Example

<html> <body> <script language="JavaScript">     function function1() {         alert(document.getElementById("myImage").width);     } </script> <img id="myImage"       src="http://www.rntsoft.com/style/logo.png"       alt="http://www.rntsoft.com"       width="300"       height="300"> <input type="button" value="Image width" onclick="function1();"> </body> </html>