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 に答える