电脑技术学习

Javascript获取任意格式文件的大小

dn001
<script type="text/javascript">
function g( filePath )
{
var img = new Image();
img.dynsrc = filePath;
return img.fileSize;
}
</script>