标签:
<input id="show" type="file" />
window.onload = function () {
var oShow = document.getElementById("show");
oShow.onchange = function () {
var filePath = this.value;
var suxPath = filePath.substr(filePath.lastIndexOf(".")+1).toUpperCase();
console.log(suxPath);
}
}
标签:
原文地址:http://www.cnblogs.com/WeWeZhang/p/5756828.html