AJAX value sending error

后端 未结 5 1155
清歌不尽
清歌不尽 2021-01-19 05:13

Hi I have problems with the script below. The problem I think lies on data that need to be sent to php via AJAX.

jQuery

$(\'.send\').live(\"click\",          


        
5条回答
  •  死守一世寂寞
    2021-01-19 06:00

    change this

    data: 'id=' + $(this).attr('id'),
    

    to

    data: {id :  $(this).attr('id')},
    

    also use on here, live is deprecated

    $('.send').on("click", function(){
    

提交回复
热议问题