zoukankan      html  css  js  c++  java
  • 在gridview的页脚的textbox等控件通过javascript取值

    Code

    <script language="javascript" type="text/javascript">

    function add()

    {

        var userid = document.getElementById("<%=((TextBox)GridView1.FooterRow.FindControl("tb_userid")).ClientID%>").value;

        var userpwd = document.getElementById("<%=((TextBox)GridView1.FooterRow.FindControl("tb_userpwd")).ClientID%>").value;

        var username = document.getElementById("<%=((TextBox)GridView1.FooterRow.FindControl("tb_username")).ClientID%>").value;

        if (userid == "")

        {

            alert("用户ID不能为空!");

            return false;

        }

        if (userpwd == "")

        {

            alert("密码不能为空!");

            return false;

        }

        if (username == "")

        {

            alert("姓名不能为空!");

            return false;

        }

        else

        {

            return true;

        }

    }

    </script

  • 相关阅读:
    12
    11
    10
    9
    8
    6. iOS APP 设计规范大全
    4. iOS中常用演示方法以及利弊
    我要写一篇动态计算tableView-cell高度的随笔
    doclever 5.5.1 安装及升级【原创】
    SPARROW-JS 从0开始写 0依赖,原生JS框架
  • 原文地址:https://www.cnblogs.com/chen110xi/p/2478795.html
Copyright © 2011-2022 走看看