zoukankan      html  css  js  c++  java
  • JS验证验证服务器控件

     1 JS验证验证服务器控件
     2 
     3 <script language="javascript" type="text/javascript">
     4        /*****************************************************************/
     5        /* 6        /*      用户信息验证
     7        /*      2012--07--30
     8        /*****************************************************************/
     9        function checkinfo()
    10        {          
    11            var TextBox1=document.getElementById('<%=TextBox1.ClientID %>').value;        
    12            if(TextBox1=="")
    13            {
    14               alert("用户名不能为空");
    15               return false;
    16            }
    17            var TextBox2=document.getElementById('<%=TextBox2.ClientID %>').value; 
    18            if(TextBox2=="")
    19            {
    20                alert("用户密码不能为空");
    21                return false;
    22            }
    23            var TextBox3=document.getElementById('<%=TextBox3.ClientID %>').value; 
    24            if(TextBox3=="")
    25            {
    26                alert("用户真实名称不能为空");
    27                return false;
    28            }
    29            var Radio1=document.getElementById('<%=Radio1.ClientID %>');
    30            var Radio2=document.getElementById('<%=Radio2.ClientID %>');
    31            if(!Radio1.checked&&!Radio2.checked)
    32            {
    33                alert("用户状态没有选择");
    34                return false;
    35            }
    36            var DropDownList1 = document.getElementById("DropDownList1.ClientID");
    37            var index = DropDownList1.selectedIndex;   
    38            var Value = DropDownList1.options[index].value;
    39            alert(Value);
    40            //var Text = ddl.options[index].text; 
    41            if(Value=="-1")
    42            {               
    43                alert("请选择地区");
    44                return false;
    45            }
    46            else
    47            {
    48                return true;
    49            }
    50        }
    51     </script>
    52 
    53  
  • 相关阅读:
    ExtJs系列教程
    linux 服务器时间 timedatectl命令时间时区操作详解
    aws CloudWatch Events
    AWS Shield
    aws ssm指令
    failed to set bridge addr: "cni0" already has an IP address different from 10.244.0.1/24
    AWS Systems Manager
    Amazon Inspector
    AWS 安全培训
    Amazon Inspector
  • 原文地址:https://www.cnblogs.com/dqh123/p/9469847.html
Copyright © 2011-2022 走看看