student.js
来自「这是一个用java三层框架做的ISS学员管理系统」· JavaScript 代码 · 共 56 行
JS
56 行
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 + =
减小字号Ctrl + -
显示快捷键?