How to load PHP file into DIV by jQuery?

前端 未结 4 710
轮回少年
轮回少年 2020-11-27 17:23

I am developing a website and I have this on the side menu :

Contact Us

then I h

4条回答
  •  有刺的猬
    2020-11-27 18:10

    You can use $.load() like this, to get more data of whats happening. When you see the error message, you probably can solve it yourself ^^

    $("#contents").load("home.php", function(response, status, xhr) {
      if (status == "error") {
          // alert(msg + xhr.status + " " + xhr.statusText);
          console.log(msg + xhr.status + " " + xhr.statusText);
      }
    });
    

提交回复
热议问题