如何获得网上某一图片的高宽?
www.sina.com/xx/x/x/a.jpg

解决方案 »

  1.   

    用隐藏的图片控件也行的,先加载下图片再得到大小<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=gb2312">
    <title>无标题文档</title>
    </head><body>
    <img name="imgurl" src="http://www.csdn.net/Images/logo_csdn.gif"/>
    </body>
    </html>
    <script language="JavaScript" type="text/JavaScript">
    alert(document.all("imgurl").width + ";" + document.all("imgurl").height)
    </script>