【发布时间】:2015-04-24 06:38:23
【问题描述】:
我正在尝试在模型弹出窗口中使用新的谷歌 reCAPTCHA 和幻想框(在本地主机中),但它没有出现。有什么想法吗?
var html = "<form method='post'><input type='text' name='nombre' autofocus required placeholder='Escribe tu nombre'/><br><input type='mail' name='mail' placeholder='Escribe tu correo'><br> <input type='tel' name='telefono' placeholder='Escribe tu teléfono'/><br><textarea rows='5' cols='35' name='mensaje' required placeholder='Escribe tu mensaje'/></textarea><br><div align='center' class='g-recaptcha' data-theme='dark' data-sitekey='XXXX'></div> <input type='checkbox' required name='condiciones' value='condiciones' /> Acepto las <a href='/wordpress/politica-de-privacidad' target='_blank'>condiciones de uso</a> <br /><input type='submit' value='Enviar' /></form>";
$(".contacto").fancybox({
'width': 600,
'height': 500,
'autoSize': false,
type: "html",
content: html,
helpers: {
overlay: {
locked: false,
css: {
'background': 'rgba(0, 0, 0, 0.55)',
}
}
}
});
【问题讨论】:
-
显示验证码的代码在哪里?
-
验证码在“var html”中。
-
我只看到一个相关的 DIV 类:
<div align='center' class='g-recaptcha'... -
在谷歌文档 (developers.google.com/recaptcha/docs/display) 中说,使用这个类并添加 js 就可以了:$
标签: jquery forms recaptcha fancybox-2