
<html>
<head>
<script language="javascript">
function getSize() {
var file = document.getElementById("upload").value;
alert(file);
var fso = new ActiveXObject("Scripting.FileSystemObject");
var f = fso.GetFile(file);
alert( '大小: '+f.Size+ 'bytes ');
}
</script>
</head>
<body>
<input id = "upload" type="file" onChange="getSize()"></input>
</body>
</html>