js得到文件后缀

function getFileExt(str)
{
var d=/\.[^\.]+$/.exec(str);
return d;
}

posted @ 2010-05-25 13:19  彼岸Elan  阅读(4290)  评论(0编辑  收藏  举报