Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我必须获取页面demo_test.php的内容,但状态总是=成功,而“数据”打印索引main的代码,而不是demo_test.php的代码。
此外,如果我放置一个不存在的 address.php,状态总是 = 成功。
$.get("demo_test.php",function(data,status){ alert("Data: " + status); });
为什么 ?谢谢。
$.get( "demo_test.php", function(data) { alert( "Data: "+data ); }) .fail(function() { alert( "We failed" ); });