jQuery .post()を使用して配列を投稿する
質問
だから私はjQueryとの全体的な.post()の経験があります。
これまでの入力値の転記のみを経験しています。私がやりたいことは配列を投稿します。
これは数字のリストの標準配列です。最終目標は次のとおりです。これらの値でクエリを実行します。
誰かが私に非常に基本的にjQuery .post()を使っている方法を非常に説明することができますか?
感謝、
解決
I guess, without going into great detail, the answer on you question is called JSON
.
The process is easy:
Backend (PHP) Array -> encode as JSON string -> send that JSON string to the browser -> decode the JSON string as Javascript Array
他のヒント
Check jQuery.post(). There is an example for posting arrays.
EDITED: Example is like;
$.post("test.php", { 'choices[]': ["Jon", "Susan"] });
Check The jQuery Site and the Docs for jQuery.post()
所属していません StackOverflow