IE不兼容模式下读取文件没有问题
将localhost添加到兼容性视图
再次读取;文件undefine
请问是什么原因?
<!doctype html>
<head>
<title>read</title>
<meta charset="utf-8">
<script type="text/javascript">
function handle(files){
console.log(files);
}
</script>
</head>
<body>
<input type="file" onchange="handle(this.files)">
<input type="button" value="click" onclick="read();">
</body>
</html>
控制台不是输出了,文档模式是7,你用的是ie7核心,files只有ie10+以上才支持
IE兼容性怎么搞?求解答