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.
この質問はすでにこことここで尋ねられています。しかし、私は3つの答えを試しましたが、うまくいきませんでした. 私は、Web サーバーとして機能する Niagara というシステムを使用しています。これが、これらの手法が機能しなかった理由である可能性があります。とはいえ、404、200、0 の存在ではなく、ファイルの存在を確認する方法が必要だと思います。
使用できます$.ajax
$.ajax
$.ajax({ url: 'example.com/abc.html', //or your url success: function(data){ alert('exists'); }, error: function(data){ alert('does not exist'); }, })