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

  • 相关阅读:
    tensorflow中协调器 tf.train.Coordinator 和入队线程启动器 tf.train.start_queue_runners
    C++ 第八天
    C++ 第七天
    C++ 第四天
    c++ 编译报错汇总(随时更新)
    C++ 第二天
    C++ 第三天
    c++ 继承(二)
    c++ 继承(一)
    回调函数
  • 原文地址:https://www.cnblogs.com/chen110xi/p/2478795.html
Copyright © 2011-2022 走看看