⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 check.js

📁 销售系统,包括配件录入,配件销售,配件修改,设置反点条件,VIP用户网上购买等
💻 JS
字号:
function checklogin(good) {
	if (good.usr.value=="") {
		alert("请输入登录名!");
		good.usr.focus();
		return false;
	}
	if (good.pwd.value=="") {
		alert("请输入密码!");
		good.pwd.focus();
		return false;
	}
	return true;
}
function checkform1(form1){
if (document.form1.elements[0].value==""){
alert("不能为空!");
document.form1.elements[0].focus();
document.form1.elements[0].document.execCommand('SelectAll');
return false;
}
}

function checkreg(login){
if (document.login.username.value==""){
alert("请输入用户名!");
document.login.username.focus();
document.login.username.document.execCommand('SelectAll');
return false;
}
if (document.login.password.value==""){
alert("请输入密码!");
document.login.password.focus();
document.login.password.document.execCommand('SelectAll');
return false;
} 
if (document.login.password.value!=document.login.yzpassword.value){
alert("两次输入的密码不一致!");
document.login.yzpassword.focus();
document.login.yzpassword.document.execCommand('SelectAll');
return false;
} 
}

function checkpjlr1(objname){//录入第一次查询检验表单
	if (objname.pjtype.selectedIndex==0){
		alert("请选择配件类型");
		return false;
		}
	if (objname.pjname.value=="" || objname.pjname.value=="配件名称"){
		alert("配件名称不能为空");
		return false;
		}
}
function checkpjpost(objname){//录入第二次提交检验表单
var jinjia=objname.dj.value;
var shl=objname.shl.value;
var shj=objname.shj.value;
var strzh="0123456789";
var strxiao="0123456789.";
if (chknum(jinjia,strxiao)==false || jinjia==""){
	alert("输入错误:\n\n"+"'"+"配件进价"+"'"+"必须填数字!");
	objname.dj.focus();
	objname.dj.document.execCommand('SelectAll');
	return false;
	}
if (chknum(shl,strzh)==false || shl=="" ||shl==0){
	alert("输入错误:\n\n"+"'"+"配件数量"+"'"+"必须填整数!");
	objname.shl.focus();
	objname.shl.document.execCommand('SelectAll');
	return false;
	}
if (chknum(shj,strxiao)==false || shj=="" || shj==0){
	alert("输入错误:\n\n"+"'"+"配件售价"+"'"+"必须填数字!");
	objname.shj.focus();
	objname.shj.document.execCommand('SelectAll');
	return false;
	}
if (jinjia>=shj){
	alert("傻瓜:\n\n你想做赔本生意呀!");
	return false;
	}
}

function chknum(ctr,strchk)  //检查是否为数字,ctr为要检查的内容,strchk为要检查应符合的内容
{
    var i,j,strTemp,TEL;
    TEL=ctr;
	strTemp=strchk;
    for (i=0;i<TEL.length;i++)
    {
        j=strTemp.indexOf(TEL.charAt(i));
        if (j==-1)
        {
        //有字符不合法
            return false;
        }
    }
    //合法
    return true;
}
function lmy_chage(targ,sspath,selObj){ //v3.0
  sspath="screech.asp?"+sspath+"&zpjxshl="+selObj.options[selObj.selectedIndex].value;
   //document.write(targ.location)
  eval(targ+".location='"+sspath+"'");
  //eval(targ.location='"'+sspath+'"');
}
function lmy_jumpMenu(targ,sspath){ //v3.0
  var sPath =parent.location.pathname;
  sPath = sPath.indexOf("?");
  if (sPath==-1){
  sspath="?"+sspath;
  }
  else{sspath="&"+sspath;
  }
   //document.write(targ.location)
  eval(targ+".location='"+sspath+"'");
  //eval(targ.location='"'+sspath+'"');
}
// JavaScript Document

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -