• 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

    %>

  • 相关阅读:
    C# 自定义文件图标 双击启动 (修改注册表)
    C/S打包 客户端/windows程序 InstallShield
    WPF 依赖属性
    WPF 自定义Expander
    WPF DevExpress ChartControl用法
    WPF 水平进度条
    WPF 自定义CheckBox
    WPF 自定义ListBox
    WPF 绕圈进度条(一)
    1.为什么要用泛型
  • 原文地址:https://www.cnblogs.com/ince/p/9154754.html
Copyright © 2020-2023  润新知