1. api 모듈 제작
2. 크롬 개발자도구의 콘솔로 json 데이터 테스트
- jquery를 사용할 수 있도록 환경구성
1
2
3
4
5
|
var jq = document.createElement('script');
jq.src = "//ajax.googleapis.com/ajax/libs/jquery/1/jquery.min.js";
document.getElementsByTagName('head')[0].appendChild(jq);
// ... give time for script to load, then type.
jQuery.noConflict();
|
cs |
- jquery json 테스트
1
2
3
4
5
6
7
8
9
10
|
$.ajax({
type: "POST",
contentType: "application/json; charset=utf-8",
url: "http://localhost:8080/xe/",
data: {module:"say_hello", act:"hello"},
dataType: "json",
success:function(msg) {
console.log(msg);
}
});
|
cs |
3. 결과 확인
참고 사이트 : http://wannabewize.tistory.com/89