CODE:
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=??????">
<script language="javascript">
<!--
function imgSel()
{
var img = new Image();
img.src = document.p_w_picpathForm.file.value;
document.p_w_picpathForm.width.value = img.width;
document.p_w_picpathForm.height.value = img.height;
document.p_w_picpathForm.size.value = img.fileSize;
document.p_w_picpaths['p_w_picpath'].src = img.src;
}
-->
</script>
</head>
<body>
<form name="p_w_picpathForm">
宽: <input name="width" type="text" size="6"> 高: <input name="height" type="text" size="6"> 大小: <input name="size" type="text" size="6"><br>
<input name="file" type="file" onChange="imgSel()"><br>
<img src="" name="p_w_picpath">
</form>
</body>
</html>

原文链接:http://www.aiwuhui.net/article/sort050/sort055/info-11564.html