var fileName = "wanjunshijiecom 2022-02-13 at 20.38.28.jpg";
方法1
var fileExtension = fileName.substring(fileName.lastIndexOf('.') + 1);
方法2
var fileExtension =fileName.substring(fileName.length-3,fileName.length).toLowerCase();
方法3
var fileExtension = fileName.split('.').pop().toLowerCase();