name file

name file

Hi there, I need retrieve the name file witht extension

 value = row.find('a').html();

I try with
  1.  String.prototype.filename = function (extension) {

  2.             var s = this.replace(/\\/g, '/');
  3.             s = s.substring(s.lastIndexOf('/') + 1);
  4.             return extension ? s.replace(/[?#].+$/, '') : s.split('.')[0];

  5.         };
  6. nomeCopertina = value.filename();
but nomeCopertina is the name of file without the extension.
how can I fix it?