Calling a php function using ajax/javascript

前端 未结 6 1289
庸人自扰
庸人自扰 2021-01-21 16:21

Ok guys I know this question has been asked before but I am very new to PHP and JavaScript and hadn\'t even heard of ajax until i started looking for an answer to this question

6条回答
  •  盖世英雄少女心
    2021-01-21 17:09

    Your code is not handling with that data. So instead, you should use following code :

    $.get("backend.php", function(response) {
        alert(response);
      })
    

    Or, to show that data on UI, assign it to any html element.

    For more understanding , please visit :jQuery.get() link

提交回复
热议问题