Home > Backend Development > PHP Tutorial > php jquery ajax调用的有关问题

php jquery ajax调用的有关问题

WBOY
Release: 2016-06-13 12:05:20
Original
894 people have browsed it

php jquery ajax调用的问题
我用jquery  ajax 写了这样一段代码 调用 aaa.php ,为什么 页面只出来 aaa.php里面 div的部分  php echo的不显示出来

$(function(){
  $(".select").click(function(){

    $.post("aaa.php",function(data){
      $("#disp-page").html(data);
    });
      
});
});

aaa.php代码如下

bbbbbbbbb

echo "aaaaa";
?>
在 form里面  action=“aaa.php” 都可以,直接在浏览器输入  http://localhost/aaa.php 也可以
就是jquery ajax 调用不行
------解决方案--------------------
alert(data); 看看是什么值。
Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template