How to get the count of file in a directory using jquery?

前端 未结 3 421
被撕碎了的回忆
被撕碎了的回忆 2020-12-11 11:10

i want t get the number of files in a folder. there are many images in my folder i want to count there numbers is there any way to do that using jquery or javascript ? Thank

3条回答
  •  轻奢々
    轻奢々 (楼主)
    2020-12-11 11:30

    I didn't tried yet, but could be like this.

    $.ajax({
        url: "/images-folder-on-server/",
        success: function (data) {
            var image_count = $(data).length();     
        }
    });
    

提交回复
热议问题