Ajax passing data to php script

前端 未结 3 1204
时光取名叫无心
时光取名叫无心 2020-11-27 04:38

I am trying to send data to my PHP script to handle some stuff and generate some items.

$.ajax({  
    type: \"POST\",  
    url: \"test.php\", 
    data: \"         


        
3条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-11-27 05:22

    You can also use bellow code for pass data using ajax.

    var dataString = "album" + title;
    $.ajax({  
        type: 'POST',  
        url: 'test.php', 
        data: dataString,
        success: function(response) {
            content.html(response);
        }
    });
    

提交回复
热议问题