gpt4 book ai didi

javascript - 联系表单上的反垃圾邮件防护

转载 作者:行者123 更新时间:2023-12-02 19:40:10 24 4
gpt4 key购买 nike

我在我的反机器人联系表单中使用了这个,但我仍然收到了大量邮件:

<script type="text/javascript">
var a = Math.ceil(Math.random() * 10);
var b = Math.ceil(Math.random() * 10);
var c = a + b
function DrawBotBoot()
{
document.write("Antibot "+ a + " + " + b +" = ");
document.write("<input id='BotBootInput' type='text' maxlength='2' size='2'/>");
}
function ValidBotBoot(){
var d = document.getElementById('BotBootInput').value;
if (d == c) return true;
return false;

}
</script>

有人可以帮助我并让这个请求让我们说“今年是哪一年”或类似的内容吗?谢谢

最佳答案

使用验证码来保护自己免受机器人的侵害。类似于 reCaptcha将满足您的需求。这将大大减少发送到您表单的垃圾邮件的数量。

关于javascript - 联系表单上的反垃圾邮件防护,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10472679/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com