📄 student.js
字号:
function add(){
link('studentAction.do?method=studentAdd');
}
function edit(){
link('studentAction.do?method=studentEdit');
}
function del(){
link('studentAction.do?method=studentDel');
}
function save(){
link('studentAction.do?method=studentFind');
}
function checkInputMinus(inputName, alertContext){
var objInput=getObject(inputName);
if(objInput==null){
alert(alertContext);
return true;
}
if(toFloat(objInput.value)<0){
//alert(objInput.value);
alert(alertContext);
if(objInput.type!='hidden'){
objInput.focus();
}
return true;
}
else{
return false;
}
}
function check_add(){
if(checkEmptys("userName","姓名不能为空!"))return ;
if(checkEmptys("userSchool","毕业学校不能为空!"))return ;
if(checkInputMinus("userSex","请选择性别!"))return ;
if(checkEmptys("profession","专业不能为空!"))return ;
if(checkEmptys("userBirth","出生日期不能为空!"))return ;
if(checkInputMinus("degreeId","请选择学历!"))return ;
if(checkEmptys("userPassword","密码不能为空!"))return ;
postForm("form1","studentAction.do?method=studentFind");
}
function check_edit(){
if(checkEmptys("userName","姓名不能为空!"))return ;
if(checkEmptys("userSchool","毕业学校不能为空!"))return ;
if(checkInputMinus("userSex","请选择性别!"))return ;
if(checkEmptys("profession","专业不能为空!"))return ;
if(checkEmptys("userBirth","出生日期不能为空!"))return ;
if(checkInputMinus("degreeId","请选择学历!"))return ;
if(checkEmptys("userPassword","密码不能为空!"))return ;
postForm("form1","studentAction.do?method=studentFind");
}
function check_dele(){
if(checkUnSelected("selected","请选择删除项!"))return ;
postForm("form1","studentAction.do?method=studentFind");
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -