ajax get 데이터 받는 방법.. 채택완료
지음ad
9년 전
조회 5,502
</p><p><script></p><p>function tel_ajax(){</p><p> jQuery.ajax({</p><p> type:"GET",</p><p> url:"/test.php", //페이지 경로</p><p><span class="Apple-tab-span" style="white-space:pre"> </span> data : {date:$('#todays').val()},</p><p> dataType:"text", // 옵션이므로 JSON으로 받을게 아니면 안써도 됨</p><p> success : function(data) {},</p><p> error : function(xhr, status, error) {alert("에러발생");}</p><p> });</p><p>}</p><p></script></p><p><a href="#" onclick="tel_ajax();">tel</a></p><p><input type="hidden" id="todays" value=""/> </p><p>
test.php에 뭐라고 써야 data를 넘겨 받을 수 있나요??ㅠ
댓글을 작성하려면 로그인이 필요합니다.
답변 1개
채택된 답변
+20 포인트
9년 전
아래의 게시물을 참고하세요.
http://makand.tistory.com/entry/jQuery-AJAX-get-post">http://makand.tistory.com/entry/jQuery-AJAX-get-post
로그인 후 평가할 수 있습니다
답변에 대한 댓글 1개
�
지음ad
9년 전
감사합니다~!
댓글을 작성하려면 로그인이 필요합니다.
답변을 작성하려면 로그인이 필요합니다.
로그인