0

由于某些原因,IE9决定对Jcrop有问题并从文件中获取要上传的数据。这条线:Jcrop和IE9图像文件未定义

var oFile = $('#image_file')[0].files[0]; 

我越来越:Unable to get properly '0' of undefined or null reference

在一天结束的时候,我需要能够访问该文件的属性...和IE9似乎并没有被能够通过询问[0].files[0]

回答

0

我不熟悉Jcrop但IE9-的功能,有访问DIV id为image_file

我使用此代码为图像加载到一个变量的一个问题:

$('#image_file').change(function() { 
        var oFile = this.files[0]; 
      //... 
    }); 
+0

这就是IE9中的问题:var oFile = $('#image_file')[0] .files [0];' – dcolumbus

1

IE9有没有这样的财产,input type="file"files财产在IE10中引入的。

+0

好吧,那肯定会开始帮助......但是解决方法是什么? – dcolumbus

+0

这打破了Jcrop。 – dcolumbus

+0

Jcrop支持IE6 + ...我不认为这是Jcrops错误,但我在上面评论过的行:'var oFile = $('#image_file')[0] .files [0];' – dcolumbus