标签:
<script language="JavaScript"> var a="abc.jpg"; function test(file_name){ var result =/\.[^\.]+/.exec(file_name); return result; } var b=test(a); alert(b); </script>
js获取文件扩展名
原文地址:http://www.cnblogs.com/xuemykisskui/p/4267357.html