function A() { var oas = new ActiveXObject("Scripting.FileSystemObject"); var d = document.a.b.value; var e = oas.getFile(d); var f = e.size; alert(f + " bytes"); } <form name="a" > <input type="file" name="b" > <input type="button" name="c" value="SIZE" onClick="A();" > </form > </body >
No comments:
Post a Comment