자바·JSP2014. 4. 11. 16:54
unction filesize() {

var size = 0;

var browser=navigator.appName;
if (browser=="Microsoft Internet Explorer")
{
var oas = new ActiveXObject("Scripting.FileSystemObject");
var filepath = document.getElementById('file').value;
var e = oas.getFile(filepath);
size = e.size;
}
else
{
var node = document.getElementById('file');
size = node.files[0].fileSize;
}
alert(size);
}


Posted by 미랭군