zoukankan      html  css  js  c++  java
  • jquery验证省市级联

    //ddlProvince省份,ddlCity市,txtAddress详细地址

            function checkAddress() {

                var provinceid = $("[name$='ddlProvince']").get(0).selectedIndex;
                var cityid = $("[name$='ddlCity']").get(0).selectedIndex;
                var name = jQuery.trim($("[name$='txtAddress']").val());
                var chkFlg = true;
                if (provinceid == 0) {
                    ShowError("CompanyAddress", "您必须对“省”进行选择!");
                    chkFlg = false;
                } else if (cityid == 0) {
                    ShowError("CompanyAddress", "您必须对“市”进行选择!");
                    chkFlg = false;
                } else if (name == null || name == "") {
                    ShowError("CompanyAddress", "请填写公司详细地址!");

                    chkFlg = false;
                } else if (name != "" && name.length > 50) {
                    ShowError("CompanyAddress", "公司地址不能多于50字!");

                    chkFlg = false;
                } else {
                    NoneError("CompanyAddress");
                    chkFlg = true;
                }
                return chkFlg;
            }

  • 相关阅读:
    停止与暂停线程
    flume日志收集框架
    mysql数据库索引
    junit
    freemarker
    python脚本
    java多线程编程核心技术学习-1
    spring 网站
    [MongoDB]学习笔记--Linux 安装和运行MongoDB
    [Spring MVC]学习笔记--form表单标签的使用
  • 原文地址:https://www.cnblogs.com/waters/p/1907542.html
Copyright © 2011-2022 走看看