문제

그래서 저는 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()

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top