检查上传文件类型:
function checkFile(obj){ var extend = obj.value.substring(obj.value.lastIndexOf(".")+1); if(extend==""){ }else{ if(!(extend=="doc")){ alert("your file is not word file,please upload the correct file!"); var nf = obj.cloneNode(true); nf.value=''; obj.parentNode.replaceChild(nf, obj); return false; } } return true; }
1 楼
pkfajax
2011-08-18
这种方法没啥实际意义的...