<a id="btnSave" href="javascript:void(0)" class="easyui-linkbutton" data-options="disabled:false" onclick="backsave(closedialog)">保存</a>
function save() {
var isValid = $('#filemanage').form('validate');
if(isValid){
if(checkacc()){
$("#filemanage").attr("action",'${requestContext.contextPath}/management/filemanage/create');
$("#filemanage").submit();
}
}
}
function closedialog(){
$(parent).domain('closeDialog');
}
function backsave(callback) {
save();
callback();
} function checkacc(){
var postfix = filemanage.file.value.substring(filemanage.file.value.lastIndexOf(".")+1);
if(postfix!=""){
if(!(postfix == "ktr"||postfix == "ktb"))
{
alert('文件类型不正确,请选择.ktr或者.ktb文件 !');
document.getElementById('file').value="";
document.getElementById('file').focus();
return false;
}
else{
return true;
}
}
}