Jquery AJAX 속성 beforeSend/complete $(document).ready(function(){ $("#btn").click(function() { $.ajax({ type:"post", url:"http://localhost:8080/JqueryTest/TEST_1.js", dataType:"json", success:function(ajaxResult){ alert("success"); }, error: function(xhr,status,error){ alert(error); } beforeSend:function(){ alert('start'); }, complete:function() { alert("end"); } }); }) } }); 돌아가기
Jquery AJAX 속성-global $(document).ready(function(){ $("#btn").click(function() { $.ajax({ type:"post", url:"http://localhost:8080/JqueryTest/TEST_1.js", dataType:"json", global : false,//기본값은 true이고 false일때는 작동안한다 success:function(ajaxResult){ alert("성공"); }, error: function(xhr,status,error){ alert(error); } }); }) .ajaxStart(function (){ $("#btn").attr("value","로딩중"); }) .ajaxStop(function(){ ..
JSON $(document).ready(function(){ $.ajax({ type:"post", //사용할 메소드 url:"http://localhost:8080/JqueryTest/TEST_1.js", //요청 URL dataType:"json", //응답의 결과로 반환되는 데이터종류 success:function(ajaxResult){ alert(ajaxResult); alert(ajaxResult[0].name +"///"+ajaxResult[0].age); alert(ajaxResult[1].name +"///"+ajaxResult[1].age); }, error: function(xhr,status,error){ alert(error); } }); }); 돌아가기 json
AJAX DataType : Script $(document).ready(function(){ $.ajax({ type:"POST", //사용할 메소드 url:"http://localhost:8080/JqueryTest/TEST.js", //요청 URL dataType:"script", //응답의 결과로 반환되는 데이터종류 success:function(obj){ alert(obj); fn_test(); }, error: function(xhr,status,error){ alert(error); } }); }); 돌아가기
AJAX DataType : XML $(document).ready(function(){ $.ajax({ type:"GET", //사용할 메소드 url:"http://localhost:8080/JqueryTest/TEST.xml", //요청 URL dataType:"xml", //응답의 결과로 반환되는 데이터종류 success:function(xml){ var name=$(xml).find("name").text(); var age = $(xml).find("age").text(); var makeHtml =""; makeHtml +=" name : "+name+""; makeHtml +=" age : "+age+""; alert(makeHtml); $("#ajaxResult").append(makeHt..
AJAX DataType : HTML $(document).ready(function(){ $.ajax({ type:"GET", //사용할 메소드 url:"http://localhost:8080/JqueryTest/TEST.html", //요청 URL dataType:"html", //응답의 결과로 반환되는 데이터종류 success:function(ajaxResult){ alert(ajaxResult); $('#ajaxResult').append(ajaxResult); }, error: function(xhr,status,error){ alert(error); } }); }); 돌아가기
1 2 돌아가기
text값테스트를 위한 예제 돌아가기
돌아가기
- Total
- Today
- Yesterday
- 부천역
- 가평여행
- oracle
- pdf ms워드 변환
- 인천여행
- 맛집
- 정동지
- 토드
- 담양 죽녹원
- 이클립스
- 보성녹차밭
- 밀리세컨드
- 덤프
- 테라로사
- 인천
- 제주도여행
- 인스타그램
- 산외한우마을
- java api
- 오라클
- 파주여행
- jdk
- 대관령양떼목장
- 임자도
- ora-01940
- PPTX
- 가평팬션
일 | 월 | 화 | 수 | 목 | 금 | 토 |
---|---|---|---|---|---|---|
1 | ||||||
2 | 3 | 4 | 5 | 6 | 7 | 8 |
9 | 10 | 11 | 12 | 13 | 14 | 15 |
16 | 17 | 18 | 19 | 20 | 21 | 22 |
23 | 24 | 25 | 26 | 27 | 28 |