jQuery Ajax: return value to caller?

前端 未结 2 650

I have some jQuery code. I have called an Ajax function file, file.php, that has some fields, like:

Milk         


        
2条回答
  •  粉色の甜心
    2020-12-12 00:05

    jQuery.ajax({
         type:"POST",
         url:"file.php",
         data:"id1="+val1+"&id2="+val2,
         success:function(data){
           jQuery("#div_id").html(data);
        }
    

提交回复
热议问题