<html>
<head>
<script>
//IE
function toSubmit(){
alert(123);
alert( new ActiveXObject("Scripting.FileSystemObject").GetFile(path).Size);
}
//FireFox || Chrome
function toSubmitFile(){
var uploadfile1 = document.getElementById("filein");
alert(document.getElementById("filein").files[0].size);
}
</script>
</head>
<body>
<form>
<input id="filein" type="file" value="选择文件" style="border:3px blue solid;"/>
<input type="button" value=" 提交" οnclick="toSubmitFile();" style="border:3px blue solid;"/>
</form>
</body>
</html>
<head>
<script>
//IE
function toSubmit(){
alert(123);
alert( new ActiveXObject("Scripting.FileSystemObject").GetFile(path).Size);
}
//FireFox || Chrome
function toSubmitFile(){
var uploadfile1 = document.getElementById("filein");
alert(document.getElementById("filein").files[0].size);
}
</script>
</head>
<body>
<form>
<input id="filein" type="file" value="选择文件" style="border:3px blue solid;"/>
<input type="button" value=" 提交" οnclick="toSubmitFile();" style="border:3px blue solid;"/>
</form>
</body>
</html>