How do I check if file exists in jQuery or pure JavaScript?

前端 未结 18 2083
闹比i
闹比i 2020-11-22 00:56

How do I check if a file on my server exists in jQuery or pure JavaScript?

18条回答
  •  孤独总比滥情好
    2020-11-22 01:23

    What you'd have to do is send a request to the server for it to do the check, and then send back the result to you.

    What type of server are you trying to communicate with? You may need to write a small service to respond to the request.

提交回复
热议问题