开发者

jquery / asp.net - get the number of images in a folder where the first two characters of the file name are XX

开发者 https://www.devze.com 2023-02-17 08:37 出处:网络
I have been looking for the best way to obtain the total number images in a folder where the first two characters on the file name are XX and place this number into a variable.

I have been looking for the best way to obtain the total number images in a folder where the first two characters on the file name are XX and place this number into a variable.

So for example - I have a folder containing the foll开发者_如何转开发owing images:

XX-01.jpg

XX-02.jpg

XX-03.jpg

YY-01.jpg

ZZ-01.jpg

So I would populate the variable with 3 in this case.

Does anyone know of any way to do this?


Do not do it in jQuery.

Go server side instead. Those are the kind of bad code another developer will curse you for.

0

精彩评论

暂无评论...
验证码 换一张
取 消