0

因此,当我尝试使用 papaparse 完整读取变量时,出现以下错误:TypeError: wpcc_results is undefined。

我真的看不出我的代码有什么问题:

$('.wpcc_gen_box_form').submit(function(event) {
                    // stop the form from submitting the normal way and refreshing the page    
                    event.preventDefault();

                    $('#wpcc_csv_file').parse({
                        complete: function(wpcc_results) {
                            console.log(wpcc_results.data);
                        }
     });
});

我认为新鲜的眼睛在这里真的会有所帮助。

我很感激任何帮助。

4

1 回答 1

1

解决方案实际上是在配置中定义完整的功能。因为那是实际传递参数的地方。在这里找到答案:https ://github.com/mholt/PapaParse/issues/168

于 2015-08-21T02:16:14.073 回答