使用JavaScript验证码 [英] CAPTCHA validation with JavaScript

查看:81
本文介绍了使用JavaScript验证码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试使用JavaScript验证验证码。但是我找不到有关Captcha客户端API的任何资源。您有任何文档吗?

I am trying to validate Captcha using JavaScript. But I could't find any resource about Client API's of Captcha. Do you have any documentation?

推荐答案

如果您可以通过JavaScript验证验证码,则表示查找有效代码的方法将很容易在传递给客户端的代码中使用,这将完全使验证码的使用完全无效。

If you could validate the captcha through JavaScript that would mean the means of finding out the valid code would be readily available in the code that you're passing to the client, which would effectively invalidate the use for a captcha altogether.

实现此目的的唯一安全方法是将AJAX请求发送到服务器,该服务器随后将验证代码。这样,您的验证将完全按照通常验证服务器上验证码的方式进行。

The only secure way to achieve this would be to send an AJAX request to the server, which would then validate the code. This way, your validation would be done exactly the way you normally validate the captcha on the server.

这篇关于使用JavaScript验证码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆