2.获取file类型的文件名 <input type="file" id="<portlet:namespace />file0">
var filePath = document.getElementById("<portlet:namespace />file" + i + "").value;
var name = filePath.substring(filePath.lastIndexOf("\\") + 1,filePath.length );
var name1 = filePath.substring(filePath.lastIndexOf("\\") + 1,filePath.lastIndexOf(".") );
效果C:\Documents and Settings\zhuqingyu\桌面\test.doc
得到 test.doc 和test