用JAVASCRIPT怎么取附件的后缀??

用JAVASCRIPT怎么取附件的后缀??
---------------------------------------------------------------

1<input onchange='a=value;alert(a.substr(a.lastIndexOf(".")+1,a.length))' type="file"/>

---------------------------------------------------------------

s=a.substr(a.lastIndexOf(".")+1,a.length)
---------------------------------------------------------------

1<input onchange='alert(value.replace(/.+\\./,""))' type="file"/>
Published At
Categories with Web编程
comments powered by Disqus