// jscript 文件 //判断是否是数字 //parameter主要的形式为控件id名1;显示的名称1,控件id名2;显示的名称2.如:tbname;名称,tbno;编号; function isnumber(parameter) { if(parameter!="") { var par1=parameter.split(','); for(i=0;i=2) { if(document.getelementbyid(par1[i].split(';')[0]).value!="") { if(isnan(document.getelementbyid(par1[i].split(';')[0]).value)) { alert(par1[i].split(';')[1]+"不是数字"); return false; } } }else{ alert("输入有误!"); return false; } } } return true; } //判断非空 //parameter主要的形式为控件id名1;显示的名称1,控件id名2;显示的名称2.如:tbname;名称,tbno;编号; function isnonull(parameter) { if(parameter!="") { var par1=parameter.split(','); for(i=0;i=2) { if(document.getelementbyid(par1[i].split(';')[0]).value=="") { alert(par1[i].split(';')[1]+"不能为空!"); return false; } }else{ alert("输入有误!"); return false; } } } return true; } function changebgcolor (tr) { var trlength = tr.childnodes.length; for(var i = 0; i < trlength; i ++) { if(tr.childnodes[i].classname != "hidden") { if(tr.childnodes[i].classname != "") { tr.childnodes[i].classname += " mouseover"; } else { tr.childnodes[i].classname = "mouseover"; } } } } function recoverbgcolor (tr) { var trlength = tr.childnodes.length; for(var i = 0; i < trlength; i ++) { var arrclassname = tr.childnodes[i].classname.split(' '); if(arrclassname.length == 1) { tr.childnodes[i].classname = ""; } else if (arrclassname.length == 2) { tr.childnodes[i].classname = arrclassname[0]; } } }