posted by 준치 2009. 3. 23. 11:15
$라가 별도로 하나씩..보기가 힘들꺼 같아서..ㅎㅎ

get방식
$.get("test.php");
$.get("test.php", { name: "John", time: "2pm" } );
$.get("test.php", { 'choices[]': ["Jon", "Susan"]} );
$.get("test.php", function(data){
  alert("Data Loaded: " + data);
});

post방식
$.post("test.php");
$.post("test.php", function(data){
  alert("Data Loaded: " + data);
});
$.post("test.aspx", { name: "John", time: "2pm" },
  function(data){
    alert("Data Loaded: " + data);
  });
$.post("test.aspx", { name: "John", time: "2pm" },
  function(data){
    process(data);
  }, "xml");

ajax 호출
 $.ajax({
   type: "POST",
   url: "some.php",
   data: "name=John&location=Boston",
   success: function(msg){
     alert( "Data Saved: " + msg );
   }
});

사용해 봤는데 data가 파라미터로 안넘어가서 그냥 url에다가 넣었네요..ㅎㅎㅎ
아직 초보라...ㅋㅋ