2011-07-06 66 views
1

我不斷收到此錯誤。這是它停止的代碼:「對象不支持此屬性或方法」在IE8和IE7

_renderUploadTemplate: function(files){ 
    var that = this; 
    return $.tmpl(
     this.options.uploadTemplate, 
     $.map(files, function(file){ 
      return that._uploadTemplateHelper(file); 
     } 
    ) 
} 

我正在使用由BlueImp提供的jQuery-File-Upload。這裏是源文件的鏈接:https://github.com/blueimp/jQuery-File-Upload

每當我嘗試上傳東西時,都會發生這種情況,在其他瀏覽器中似乎可以正常工作。

回答

1

嘗試將此代碼放入文檔中。有時舊版本的IE不能正確初始化。

1
_renderUploadTemplate: function(files){ 
    var that = this; 
    return $.tmpl(
     this.options.uploadTemplate, 
     $.map(files, function(file){ 
      return that._uploadTemplateHelper(file); 
     }); //right here 
    ) 
} 

我想你錯過了一個括號。

相關問題