jQuery $.getJSON works only once for each control. Doesn't reach the server again

前端 未结 4 2018
Happy的楠姐
Happy的楠姐 2021-02-04 13:40

First my code

$.getJSON(\"./posts/vote/\" + postId + \"/1\", null, function(result) {
   if (result.result == true)
      $(\"#pst\" + postId + \" > .pstside          


        
4条回答
  •  无人共我
    2021-02-04 14:29

    Yes, $.ajaxSetup({ cache: false }); does solve the problem! My application is with MVC 2. The code is like below:

    
    

提交回复
热议问题