JQuery Ajax POST in Codeigniter

后端 未结 5 1010
情深已故
情深已故 2020-12-09 18:58

I have searched a lot of tutorials with POST methods and saw answered questions here too but my POST still doesn\'t work...I thought i should post it here if you guys see so

5条回答
  •  感情败类
    2020-12-09 19:44

    $(document).ready(function(){   
    
        $("#send").click(function()
        {       
         $.ajax({
             type: "POST",
             url: base_url + "chat/post_action", 
             data: {textbox: $("#textbox").val()},
             dataType: "text",  
             cache:false,
             success: 
                  function(data){
                    alert(data);  //as a debugging message.
                  }
              });// you have missed this bracket
         return false;
     });
     });
    

提交回复
热议问题