问题描述
大家好,
如何在javascript(asp.net)中获取上传文件的文件大小?
我是使用HTML文件上传控件。
b elow是我正在尝试的代码,但不知道如何继续。请帮帮我。
function checkFileSize()
{
          var输入,文件,结果,文件名;
          input = document.getElementById('fuAttachments'); // new ActiveXObject(" Scripting.FileSystemObject"); //
          filename = input.value;
}
< input id = " fuAttachments"类型= QUOT;文件"平变化= QUOT; checkFileSize()" />
谢谢
Naren
Hi everyone,
how to get file size of a uploaded file in javascript (asp.net)?
i am using HTML fileupload control.
below is the code i was trying but no idea how to proceed. please help me out.
function checkFileSize()
{
var input, file, result, filename;
input = document.getElementById('fuAttachments'); // new ActiveXObject("Scripting.FileSystemObject");//
filename=input.value;
}
<input id="fuAttachments" type="file" onchange="checkFileSize()" />
Thanks
Naren
这篇关于如何在javascript(asp.net)中获取上传文件的文件大小?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!