I encountered this problem when writing a function to adapt the size of images...
Haha, I won’t go into details about the problem. I encountered another stone on the way to solve it, which is how to use JS to get the file name of the image. .
After thinking about it for a long time, I finally wrote a function...
I saved it for the first time for future use