donglin1692 2013-10-24 23:32
浏览 53

.get请求始终成功状态

I have to get the content of page demo_test.php, but the status is always = success, while "data" print the code of the index main and then not of demo_test.php.

Also if I put an inexistent address.php, status is always = success.

 $.get("demo_test.php",function(data,status){
    alert("Data: " + status);
 });

Why ? Thanks.

  • 写回答

1条回答 默认 最新

  • drb56625 2013-10-25 00:10
    关注
    $.get( "demo_test.php", function(data) {
      alert( "Data: "+data );
    })
    .fail(function() {
        alert( "We failed" );
     });
    
    评论

报告相同问题?