zoukankan      html  css  js  c++  java
  • 检查密码和确认密码的JavaScript

    function checkPassword()
     {
      if(document.getElementById("password").value==null||document.getElementById("password").value=="")
      {
       document.getElementById("spanPassword").innerHTML = "<font color='red'>请输入密码 *</font>";
       return false;
      }
      document.getElementById("spanPassword").innerHTML = "<font color='red'>*</font>";
     }
     
     function checkPasswordConfig()
     {
      var a=document.getElementById("password").value;
      var b=document.getElementById("passwordConfig").value;
      
      if(b==null||b=="")
      {
       document.getElementById("spanPasswordConfig").innerHTML = "<font color='red'>请您确认密码! *</font>";
       return false;
      }
      if(a!=b)
      {
       document.getElementById("spanPasswordConfig").innerHTML = "<font color='red'>您两次输入的密码不一致! *</font>";
       return false;
      }
      
      document.getElementById("spanPasswordConfig").innerHTML = "<font color='red'>*</font>";
     }

  • 相关阅读:
    PHP学习(一)----变量及字符串
    swith
    重写和重载的区别
    静态对象与非静态对象
    继承
    面向对象
    五个对面向对象的实例
    双色球 36选7
    菱形java代码
    双色球代码
  • 原文地址:https://www.cnblogs.com/xianyin05/p/3114361.html
Copyright © 2011-2022 走看看