📄 0451skyteacher.js
字号:
function isValidCode(strCode)
{
var i, cChar
var strValidID = "0123456789-.";
for (i = 0; i < strCode.length; i ++ )
{
cChar = strCode.charAt(i);
if(strValidID.indexOf(cChar) == - 1) return false;
}
return true;
}
function SkyTeacher()
{
var info, s, ad;
ad = "〖学校教务管理系统提示您!〗\n";
info = ad + "您确实要批量增加信息吗?";
s = document.getElementById("TxtAddNum")
if(s.value == "" || ! isValidCode(s.value) || s.value.length < 4)
{
alert(ad + "教师编号前缀不能为空,并且必须是数字(4位)!\n请选择相应的院系自动生成编号!\n并手动增加教师来学校的时间年(2位)\n例如:2005年=05");
s.focus();
return false;
}
s = document.getElementById("TxtENum")
if(s.value == "" || ! isValidCode(s.value))
{
alert(ad + "教师编号结束不能为空,并且必须是数字(3位)!");
s.focus();
return false;
}
// #####################################################
s = document.getElementById("TxtXZ")
if(s.value == "")
{
alert(ad + "教师学制不能为空)!");
s.focus();
return false;
}
// ######################################################
s = document.getElementById("TxtXL")
if(s.value == "")
{
alert(ad + "教师学历不能为空)!");
s.focus();
return false;
}
// ######################################################
s = document.getElementById("TxtMZ")
if(s.value == "")
{
alert(ad + "教师民族不能为空)!");
s.focus();
return false;
}
// ######################################################
if(confirm(info))
{
return true;
}
else
{
return false;
}
}
// ###########################################
function SkyTeacherreg()
{
var info, s, ad;
ad = "〖学校教务管理系统提示您!〗\n";
info = ad + "您确实要批量增加信息吗?";
s = document.getElementById("TxtAddNum")
if(s.value == "" || ! isValidCode(s.value) || s.value.length < 8)
{
alert(ad + "教师编号不能为空,并且必须是数字(8位)!\n请选择相应的院系自动生成编号!\n并手动增加教师来学校的时间年(2位)\n例如:2005年=05");
s.focus();
return false;
}
s = document.getElementById("TxtENum")
if(s.value == "" || ! isValidCode(s.value))
{
alert(ad + "教师编号结束不能为空,并且必须是数字(3位)!");
s.focus();
return false;
}
// #####################################################
s = document.getElementById("TxtXZ")
if(s.value == "")
{
alert(ad + "教师学制不能为空)!");
s.focus();
return false;
}
// ######################################################
s = document.getElementById("TxtXL")
if(s.value == "")
{
alert(ad + "教师学历不能为空)!");
s.focus();
return false;
}
// ######################################################
s = document.getElementById("TxtMZ")
if(s.value == "")
{
alert(ad + "教师民族不能为空)!");
s.focus();
return false;
}
// ######################################################
if(confirm(info))
{
return true;
}
else
{
return false;
}
}
// ###########################################
function SkyTeacherregs()
{
var info, s, ad;
ad = "〖学校教务管理系统提示您!〗\n";
info = ad + "您确实要批量增加信息吗?";
s = document.getElementById("TxtAddNum")
if(s.value == "" || ! isValidCode(s.value) || s.value.length < 8)
{
alert(ad + "学生编号不能为空,并且必须是数字(8位)!\n请选择相应的院系自动生成编号!\n并手动增加教师来学校的时间年(2位)\n例如:2005年=05");
s.focus();
return false;
}
// #####################################################
s = document.getElementById("TxtXZ")
if(s.value == "")
{
alert(ad + "教师学制不能为空)!");
s.focus();
return false;
}
// ######################################################
s = document.getElementById("TxtXL")
if(s.value == "")
{
alert(ad + "教师学历不能为空)!");
s.focus();
return false;
}
// ######################################################
s = document.getElementById("TxtMZ")
if(s.value == "")
{
alert(ad + "教师民族不能为空)!");
s.focus();
return false;
}
// ######################################################
if(confirm(info))
{
return true;
}
else
{
return false;
}
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -