// 导入excel
function importExcel(){
var uploadForm = document.getElementById("uploadFormId");
var importFile = document.getElementById("importFile");
if(importFile.value == '' || !importFile.value.endWith("xls")){
alert("导入文件必须为.xls文件!");
} else {
uploadForm.submit();
}
}
String.prototype.endWith = function(str){
if(str==null||str==""||this.length==0||str.length>this.length){
return false;
}
if(this.substring(this.length-str.length)==str){
return true;
} else {
return false;
}
return true;
}
String.prototype.startWith=function(str){
if(str==null||str==""||this.length==0||str.length>this.length)
if(this.substr(0,str.length)==str)
else
return true;
}
String.prototype.trim=function(){
}
String.prototype.ltrim=function(){
}
String.prototype.rtrim=function(){
}