How to get return value in a function with inside Ajax call - JQuery

后端 未结 5 1208
遥遥无期
遥遥无期 2021-01-07 02:39

this may sound very easy to few of you, but i am not able to figure out why I am not able to get the return value, even after chceking many posts :(

function         


        
5条回答
  •  执念已碎
    2021-01-07 03:38

    function ajax_call(url,data){
          return $.ajax({ type: "POST",
            url: url,
            data: data,
            async:false,
            success: function(status){
            }
        }).responseText;
    }
    

    Now you will get the response text from server side via ajax call

提交回复
热议问题