How to load a PHP page into a div with jQuery and AJAX?

后端 未结 6 551
名媛妹妹
名媛妹妹 2021-02-03 13:58

I am trying to write a function that will call getproduct.php?id=xxx when clicked. I can get the innerHTML portion to appear, but how do I also call t

6条回答
  •  春和景丽
    2021-02-03 14:37

    You can use get or post request using query

    $.ajax({
    type: "POST",
    url: url,
    data: data,
    success: success,
    dataType: dataType
    });
    

    example

提交回复
热议问题