我用 javascript 创建验证码。这是我的代码:
var a = Math.ceil(Math.random() * 10);
var b = Math.ceil(Math.random() * 10);
var c = Math.ceil(Math.random() * 10);
变量 d = a + b + c;
函数 DrawBotBoot(){
document.write("什么是"+a+"+"+b+"+"+c+"?");
}
函数 ValidBotBoot(){
var e = document.getElementById('BotBootInput').value;
如果 (e == d) 返回真;
返回假;
}
$(函数(){
$(".commentblogsubmit").click(function()
{
if(ValidBotBoot() == false){
警报(“错误”);
}别的{
alert("成功!!!");
}
返回假;
});
});
但如果我包括 addthis,警报总是错误
对不起我的英语不好