.post()
Python関数でデバイスのステータスを照会するために使用します。の場合はdone
、python 関数の戻り値で返ってくるはずです。
$.post('/request', {inputText: fbNum,key_pressed: fbType.toString()}).done(function (reply) {
if (reply ^= "count") {
$('#status_table tr #'+eachStatus).empty().append(the-reply-value-here);
} });
私のpythonファイルの一部:
elif "C?" in response[0]:
status="Count= %sH"%response[0].strip()[-2:]
return status
ステータスを取得して表示するにはどうすればよいですか? .get
jqueryで使用しますか?しかし、私はその形式に自信がありません。それは...ですか
$.get("/request", reply).done(function(data){
$('#status_table tr #'+eachStatus).empty().append(the-reply-value-here);});
??
しかし、私がする返事はのようなものCount = FF
です。表示したいのはFF
. どうすればいいですか?