📜  通过 ajax 获取 html - PHP 代码示例

📅  最后修改于: 2022-03-11 14:54:14.042000             🧑  作者: Mango

代码示例2
//your jquery code will be like this:
$.ajax({
      type: 'POST',
      url: $url,
      data: new FormData(this),
      dataType: 'json',
      contentType: false,
      processData:false,//this is a must
      success: function(response){ 
              $('your_selector').html(response);
      }
});

//php code will be like this
echo '
some html code
'; die();