chkmode.js

来自「一个不错的个人商务网站的源码」· JavaScript 代码 · 共 48 行

JS
48
字号
function regsubmit()
{
 if (document.reg.username.value == "")        
  {        
    window.alert("用户名不能为空!");        
    document.reg.username.focus();        
    return (false);}  
 if (document.reg.email.value == "")        
  {        
    window.alert("电子邮件地址不能为空!");        
    document.reg.email.focus();        
    return (false);} 
 if (document.reg.question.value == "")        
  {        
    window.alert("密码提示问题不能为空!");        
    document.reg.question.focus();        
    return (false);} 
 if (document.reg.realname.value == "")        
  {        
    window.alert("真实姓名不能为空!");        
    document.reg.realname.focus();        
    return (false);} 
 if (document.reg.idcard.value == "")        
  {        
    window.alert("身份证号码不能为空!");        
    document.reg.idcard.focus();        
    return (false);}
 if (document.reg.address.value == "")        
  {        
    window.alert("详细地址不能为空!");        
    document.reg.address.focus();        
    return (false);} 
 if (document.reg.postal.value == "")        
  {        
    window.alert("邮政编码不能为空!");        
    document.reg.postal.focus();        
    return (false);} 
 if (document.reg.phone.value == "")        
  {        
    window.alert("联系电话不能为空!");        
    document.reg.phone.focus();        
    return (false);} 
 if (document.reg.checkcode.value == "")        
  {        
    window.alert("验证码不能为空!");        
    document.reg.checkcode.focus();        
    return (false);} 
 }

⌨️ 快捷键说明

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