I am trying to fix a problem. The code in the file is
var randomstring = (Math.random() + 1).toString(36).substring(7) + n; The above code generate suffix as -adfs234sdfsdf and -asf3254sadf23 means random characters + numbers combination Example: abc-wallpaper-adfs234sdfsdf.jpg def-wallpaper-asf3254sadf23.jpg
What I am trying to get is prefix as 0001a-abc-wallpaper.jpg instead of -asf3254sadf23
So, what coding should I use to get 0001a, 0002b as the result using var randomstring = (Math.random() + 1).toString(36).substring(7) + n; function ?
برچسب:
نویسنده: استخدام کار