且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

从客户端验证验证码

更新时间:2022-10-16 23:08:16

在客户端验证毫无意义,因为您的脚本可以由恶意Malory更新或刚删除共。可能有一种方法可以挂钩注册控件的事件,以确保验证码有效,你***还是考虑一下。


正如F-ES提到的那样,它不是在客户端实现它是一个好主意,但如果你真的需要在客户端进行,这里有一个很好的帖子



使用JavaScript验证客户端的Google RECaptcha和ASP.Net中的jQuery
[ ^ ]



及其演示在其中 [ ^ ]

Hello,

I am using capcha with asp.net register controler so not able to check catcha validation from code behind.

Please suggest me how we can validate captcha from client side.

Using captcha url:
Google ReCaptcha 2.0 - ASP.net Control[^]

Thanks
shubham gupta

Validating on the client is pointless as your script can be updated by Malicious Malory or just removed altogether. There is probably a way of hooking into the events of the register control to ensure the captcha is valid, you're better off looking into that.


As F-ES have mentioned it is not a good idea to implemnt it on client side, but in case you really need to do it on client-side, here is a good post on it

Validate Google RECaptcha on Client Side using JavaScript and jQuery in ASP.Net
[^]

and the demo for it here[^]