0

如果某些浏览器不支持,我想使用 javascript获取文件大小或捕获错误。IE 10 支持,即 9、8 ... 不支持
我使用但不工作。我该怎么做谢谢

<meta http-equiv="X-UA-Compatible" content="IE=edge"><!-- not working -->
<meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1"><!-- not working -->
<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE9" ><!-- not working -->

<input type="file" id="myFile" />
if (document.getElementById('myFile').files[0]){
     // do something
} else {// can't catch to print 
   alert('don't support');
}
4

0 回答 0