How to use getJSON, sending data with post method?

后端 未结 7 1001
暗喜
暗喜 2020-11-29 17:45

I am using above method & it works well with one parameter in URL.

e.g. Students/getstud/1 where controller/action/parameter format is applied.

7条回答
  •  离开以前
    2020-11-29 18:36

    if you have just two parameters you can do this:

    $.getJSON('/url-you-are-posting-to',data,function(result){
    
        //do something useful with returned result//
        result.variable-in-result;
    });
    

提交回复
热议问题