hi guys
new in javascript so my question is i wanna validate the file extension
like this
namewww.jpg
ojfgt.rtf
hfyrkeode.pdf
so my problem is i don't know the length of the file name so i wanna validate base file.ext
var f = fld;
var t = f.substring(-4)
so i am wondering if this is the right syntax of substring
new in javascript so my question is i wanna validate the file extension
like this
namewww.jpg
ojfgt.rtf
hfyrkeode.pdf
so my problem is i don't know the length of the file name so i wanna validate base file.ext
var f = fld;
var t = f.substring(-4)
so i am wondering if this is the right syntax of substring
Comment