我有以下的输入文件标签:
<input type="file" id="handlerxhr1" />
在Mozilla中,当我运行以下jQuery代码时:
var input = $('#handlerxhr1')[0];
$('#upload').click(function() {
alert(input.files[0]);
});
我得到的响应是:[object File](这很好)。
但在IE中,我得到了“input.files.0未定义”的错误。
我做错了什么?