this.btnOK.Attributes.Add( "onclick ", "Check(); ")
补充一下千万别忘记加return
即this.btnOK.Attributes.Add( "onclick ", "return   Check(); ")
不加的话。不管你js执行怎么样都会之后执行c#代码的。
这样你在js里面在不符合要求的时候。写return   false;
那么就不会执行之后服务端的事件了!

转自http://topic.csdn.net/u/20070303/02/8622b8a9-4db9-460e-9109-77d2db959207.html

相关文章:

  • 2021-12-26
  • 2022-12-23
  • 2022-12-23
  • 2021-10-25
  • 2022-12-23
  • 2021-08-19
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-10-31
  • 2022-12-23
  • 2021-08-09
  • 2021-06-07
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案