JavaScript Dateierweiterung erhalten
var fileName = "myDocument.pdf";
var fileExtension = fileName.split('.').pop(); //"pdf"
Grepper
var fileName = "myDocument.pdf";
var fileExtension = fileName.split('.').pop(); //"pdf"
var ext = fileName.split('.').pop();
var ext = fileName.substr(fileName.lastIndexOf('.') + 1);