Check if a file exists locally using JavaScript only

后端 未结 10 1710
盖世英雄少女心
盖世英雄少女心 2020-12-03 14:01

I want to check if a file exists locally, where the HTML file is located. It has to be JavaScript. JavaScript will never be disabled. jQuery is not good but can do.

10条回答
  •  甜味超标
    2020-12-03 14:34

    Fortunately, it's not possible (for security reasons) to access client-side filesystem with standard JS. Some proprietary solutions exist though (like Microsoft's IE-only ActiveX component).

提交回复
热议问题