function test(obj){
var fileName = $.trim($("#file").val());
if(fileName.length>0 && fileName != ''){
var idx = fileName.lastIndexOf(".");
var suffix = fileName.substring(idx+1);
if(suffix.toLowerCase() != 'zip' && suffix.toLowerCase() != 'rar'){
sco_alert('文件必须为zip或rar格式');
$("#file").replaceWith("<input type='file' name='file' id='file' accept='.rar, .zip' onchange="test(this);" required autofocus>");
return;
}
}
}