zoukankan      html  css  js  c++  java
  • asp数据校验

    <%

    if trim(request("action"))="add" then

    if request.form("cn_name1")=Empty or request.Form("pwd")=Empty or request.Form("pwd2")=Empty or request.Form("class")=Empty   then

    response.Write("<script language=javascript>" & chr(13) & "alert('错误:请将信息输入完整!带*项必须填写!');" & "javascript:history.go(-1)" & "</script>")

    elseif request.form("pwd") <> request.form("pwd2") then

    response.write("<script language='javascript'> alert('错误:密码与确认密码不符!'); javascript:history.go(-1) </script>")

    elseif len(request.form("cn_name1"))>16 then

    response.write("<script language='javascript'> alert('错误:用户名长度超过16个字符,10个汉字'); javascript:history.go(-1) </script>")

    elseif len(request.form("cn_name1"))<4 then

    response.write("<script language='javascript'> alert('错误:用户名长度少于4个字符,2个汉字'); javascript:history.go(-1) </script>")

    elseif len(request.form("class"))<2 then

    response.write("<script language='javascript'> alert('错误:班级名称少于4个字符!'); javascript:history.go(-1) </script>")

    elseif len(request.form("pwd"))>20 or len(request.form("pwd"))<6 then

    response.write("<script language='javascript'> alert('错误:你输入的密码长度不符合!'); javascript:history.go(-1) </script>")

    end if

    end if

    %>

  • 相关阅读:
    Android 目前最稳定和高效的UI适配方案
    很值得收藏的安卓开源控件库
    django-初始配置(纯手写)
    面向对象 继承
    wsgiref手写一个web服务端
    socket手写一个简单的web服务端
    vue指令
    vue入门
    python中and,or
    面向对象三大特性-继承
  • 原文地址:https://www.cnblogs.com/ince/p/9154754.html
Copyright © 2011-2022 走看看