ajax post 방식에서 function 이 필요할때 두가지 방법

Posted by RAY.D
2015. 4. 28. 09:42 Web/javascript / jQuery
336x280(권장), 300x250(권장), 250x250, 200x200 크기의 광고 코드만 넣을 수 있습니다.




ajax post 방식에서 function 이 필요할때 두가지 방법 



방법 1.


        $.post("@Url.Action("", "")"

    , 파라미터

, function () {

//동작할 내용 넣음 });



방법 2.


$.ajax({             url: "@Url.Action("""")",             type: "POST",             dataType: 'json',             data: datavalue,             contentType: "application/json; charset=utf-8",             success: function (result) { //여기에 동작할 내용 넣음             }         });