客户端代码:

<script type="text/javascript">
  function Check()
  {
      var name=document.getElementById("txtStationName");
      var url=document.getElementById("txturl");
      if(name.value==""||url.value=="")
      {
        alert("站点名称或站点地址不能空!");
        return false;
      }
  }
</script>

 

在后台cs页面引用:

this.Button1.Attributes.Add("onclick", "return Check();");

相关文章:

  • 2022-01-01
  • 2021-10-29
  • 2022-02-26
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2021-11-30
猜你喜欢
  • 2021-06-01
  • 2022-12-23
  • 2021-07-14
  • 2021-11-25
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案