1
<script type="text/javascript">
2
function getFileSize(filePath)
3
{
4
var image=new Image();
5
image.dynsrc=filePath;
6
alert(image.fileSize);
7
}
8
</script>
9
<body>
10
<INPUT TYPE="file" NAME="file" SIZE="30" onchange="getFileSize(this.value)">
11
</body>

2

3

4

5

6

7

8

9

10

11
