Foreach file in directory jQuery

前端 未结 4 1324
南方客
南方客 2020-12-21 13:09

How can I do a foreach(File file in Directory) kind of thing in jQuery.

Thank you!

4条回答
  •  独厮守ぢ
    2020-12-21 13:40

    If the files are on the client you can't access them for security reasons.

    If the files are on the server and you want process the list sever-side you wouldn't use JQuery as it's for client-side scripting.

    If the files are on the server and you want to process the list client-side, you could generate the list in the server code and send it down as xml, json, etc.

    If the files are on somebody else's server your only options is to recursivly follow links on their site, which is not really something you'd want to be doing with Javascript from a client's browser.

提交回复
热议问题