jquery $.post function's result data

前端 未结 4 1125
死守一世寂寞
死守一世寂寞 2021-01-16 09:18

When I make an ajax call (see code below), what is \"data\". How do I set and get data

//  $.post()  
 $(\"#post\").click(function(){  
     $(\"#result\").h         


        
4条回答
  •  -上瘾入骨i
    2021-01-16 09:33

    $.post('fileName.php',{
    
    data: $('#id').val(),
    },
    function(response)
    {
      alert(response);
    }
    }
    

提交回复
热议问题