weixin_33744854 2014-05-15 08:24 采纳率: 0%
浏览 35

jQuery中的Ajax无法正常工作

(All is good now. There was something wrong with my ASP script. Sorry!)

I've wrote the following script, and it's suppose to update the text in a DIV with the classname .displaymode, but it wasn't updated. Did I left out something here?

//On "Saving Payment Status"
$("input[name=savepaymentstats]").click(function(){ 
    //Some Codes
    $.ajax({
        url:"paymentstatsupdate.asp?mode=haha",
        success:function(result) { 
            $(".displaymode").html(result); 
        }
    });
    $(".displaymode").show();   
}); 
  • 写回答

1条回答 默认 最新

  • weixin_33682790 2014-05-15 08:31
    关注

    Try this:

    $(function() {
       $("input[name=savepaymentstats]").click(function(){ 
          $.ajax({url:"paymentstatsupdate.asp?mode=haha",success:function(result) { 
                $(".displaymode").html(result).show(); 
             }
          });
       }); 
    });
    
    评论

报告相同问题?