62,268
社区成员
发帖
与我相关
我的任务
分享
[code=HTML]
<html>
<head>
<title>TEST</title>
</head>
<script language="javascript">
function ShowFileInfo()
{
fso = new ActiveXObject("Scripting.FileSystemObject");
var f, file;
if ("object" != typeof(fso)) return;
file = document.all.upload.value;
f = fso.GetFile(file);
alert(f.size);
}
</script>
<body>
<input type="file" id="upload" name="upload"/><button onclick="ShowFileInfo();">ABCD</button>
</body>
</html>