<script type="text/javascript">
</script>
<script type="text/javascript"><!-- function getFileSize1(filename){ var size = null; var file = null; if(filename){ var fso = new ActiveXObject("Scripting.FileSystemObject"); try{ file=fso.GetFile(filename); size=file.Size; } catch(e){ return("get file error."); } } return(size); } --> </script>
<div>
<input id="upfile" type="file" value="upload" />
<input type="button" value="get size" οnclick="var msg=getFileSize(document.getElementById('upfile').value);alert(msg);" />
</div>