私は私のサーバーのエンドポイント印刷サーバの応答
@app.route('/predict', methods=['GET', 'POST', 'OPTIONS'])
@crossdomain(origin='*')
def predict():
return 'predict12'
を管理している私は私のAJAX呼び出しのコールバックでpredict12
を返したいです。
$.ajax({
type: "POST",
url: 'https://linear-yen-140912.appspot.com/predict',
data: 'data',
success: function test(){console.log()},
});
それはpredict12
を出力するので、私はsuccess
機能に何を置くべき?
はこのような何かにあなたの成功の機能を変更してみてください使用すべきかのthats: '成功:機能テスト(コールバック){はconsole.log(コールバック)} ' – TheMintyMate
ありがとう!それはうまくいった。 –
jQueryでAjaxのドキュメントを読んでいませんか? – epascarello