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

相关文章:

  • 2022-02-20
  • 2022-12-23
  • 2021-08-08
  • 2022-12-23
  • 2021-06-23
  • 2021-06-03
  • 2021-11-26
  • 2021-08-10
猜你喜欢
  • 2022-02-26
  • 2021-07-29
  • 2022-12-23
  • 2022-12-23
  • 2021-12-14
  • 2021-11-10
  • 2021-07-13
相关资源
相似解决方案