0

次の状況があります。

// callback function for the asynchronous call
function get_data_cb(z, arg1) {
    // do something
}

function foo() {
    var n = 1;
    // get_data is a server-side function triggered by the AJAX call, 
    // client only has the wrapper function with the same name
    get_data(get_data_cb);  // 1
}

私の質問:

1) で、変数 n を get_data_cb まで渡すにはどうすればよいですか? サーバー側の ajax 関数で sajax_export() を使用して、クライアント側のラッパーを生成しています。

4

0 に答える 0