PHP, JAVA

     jQuery.ajax({
          url: "./guide.html",    //페이지
          global: false, 
          type: "POST",
          data: $("#frm").serialize(),
          dataType: "string",                //json xml text
          async:false,
          clearForm:true,
          resetForm:true,
          success: function(data){
               //성공 액션

 

          },
          error: function(response, textStatus, errorThrown){
               //실패 액션
          },
          beforeSend:function() {
               //실행되기 전 액션

 

          }

     }); 




C#
    $.ajax({
        type: "post",
        url: "ResponseText.aspx/GetMessage",
        data: "{}",
        contentType: "application/json; charset=utf-8" ,
        dataType: "json",
        success: function (data) {
          alert(data.d); // 단일값 : {key:'value'}
        },
        error: function (data) { alert('에러 발생' ); }

    });

Posted by 철냄비짱
,