<
html
>
<
input
type
="file"
name
="file"
onchange
="getFileSize(this.value)"
>
<
script
language
="JavaScript"
>
function
getFileSize(files)
{
var
file,fileObject;
file
=
new
ActiveXObject(
"
Scripting.FileSystemObject
"
);
fileObject
=
file.GetFile(files);
var
fileSize
=
fileObject.size
/
1024
;
alert(fileSize
+
"
K
"
);
}
</
script
>
</
html
>