zoukankan      html  css  js  c++  java
  • JS判断Gridview

     function chkDetailValid() {
                var gv = document.getElementById("gvDetail");
                for (var i = 0; i < gv.rows.length; i++) {
                    var txtAC = gv.rows[i].cells[7].getElementsByTagName("input")[0];
                    var txtLoc = gv.rows[i].cells[8].getElementsByTagName("input")[0];
                    var txtDept = gv.rows[i].cells[9].getElementsByTagName("input")[0];
                    if (txtAC != null) {
                        if (txtAC.value == '') {
                            alert("<%=localize.lblCOA + localize.IsNotAllowNull%>"); //会计科目代码不能为空。
                            txtAC.focus();
                            return false;
                        }
                    }

                    if (txtLoc != null) {
                        if (txtLoc.value == '') {
                            alert($("#lblLocationTitle").html() + "<%=localize.IsNotAllowNull %>"); //不能为空。
                            txtLoc.focus();
                            return false;
                        }
                    }

                    if (txtDept != null) {
                        if (txtDept.value == '') {
                            alert($("#lblDeptTitle").html() + "<%=localize.IsNotAllowNull %>"); //不能为空。
                            txtDept.focus();
                            return false;
                        }
                    }
                    var vatInvoice = obj.value;
                    if (vatInvoice != '')
                        var xmlURL = "JsonData.ashx?t=IV&val=" + vatInvoice;
                    $.get(xmlURL, {}, function(result) {
                        if (result == "N") {
                            alert("<%= localize.lblVatInvoice + localize.IsExists%>"); //發票號碼已經存在。
                            obj.value = '';
                            obj.focus();
                            return false;
                        }
                    }, "text");
                }

                return true;
            }

  • 相关阅读:
    易语言破解与安装
    用 AS3.0 的 fscommand 命令调用 .exe 文件。
    swf批量导出
    pureMVC java版搭建流程
    PureMVC 框架总结收录
    一些算法
    练习3.34
    关于数组的注意事项
    练习3.30、3.33
    练习3.27、3.28、3.29
  • 原文地址:https://www.cnblogs.com/Chinarain/p/3914044.html
Copyright © 2011-2022 走看看