JS获得要上传的图片的长度和宽度
<html>
<head>
<title>显示上传图像的大小</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<FORM name=form action="" method=post encType=multipart/form-data><INPUT onpropertychange=document.all.aaaa.src=this.value type=file name=upload><BR>宽:<INPUT name=W> 高:<INPUT name=H><BR><INPUT type=submit value=提交> <IMG style="POSITION: absolute; TOP: -100000px" onerror='alert("类型错误或者目标不存在");' onload={document.all.W.value=this.width;document.all.H.value=this.height;} name=aaaa> </FORM>
</body>
</html>
<head>
<title>显示上传图像的大小</title>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
</head>
<body>
<FORM name=form action="" method=post encType=multipart/form-data><INPUT onpropertychange=document.all.aaaa.src=this.value type=file name=upload><BR>宽:<INPUT name=W> 高:<INPUT name=H><BR><INPUT type=submit value=提交> <IMG style="POSITION: absolute; TOP: -100000px" onerror='alert("类型错误或者目标不存在");' onload={document.all.W.value=this.width;document.all.H.value=this.height;} name=aaaa> </FORM>
</body>
</html>