I am falling in a trouble and need your help for solving it
I want to get the width and heignt of an image before uploading it. Below is my code
<script language="javascript">
Expand|Select|Wrap|Line Numbers
- function showImage(i)
- {
- x=new Image;
- x.src=i;
- iw=x.width;
- ih=x.height;
- alert("Image width is: "+iw+" pixels, and image height is: "+ih+" pixels.");
- }