Get file extension using javascript

by satheeshkumar 2012-06-12 16:02:04


The following code is used to get the extension of file using Java Script,


Code:

var find_file_ext=document.getElementById('filename').value;
var file_ext=/[^.]+$/.exec(find_file_ext);
alert(file_ext);

Tagged in:

923
like
0
dislike
0
mail
flag

You must LOGIN to add comments