我希望仅对未启用JavaScript的浏览器使用recaptcha。为此,我尝试使用<noscript>
标签,如下所示。
<!DOCTYPE html>
<html>
<head>
<title>recaptcha</title>
</head>
<body>
<noscript>
<?php
require_once('recaptcha-php-1.11/recaptchalib.php');
echo recaptcha_get_html('xxx');
?>
</noscript>
<p>Done</p>
</body>
</html>
使用http://validator.w3.org验证代码时,收到以下错误:
Error Line 11, Column 11: The element noscript must not appear as a descendant of the noscript element.
<noscript>
Error Line 12, Column 147: The frameborder attribute on the iframe element is obsolete. Use CSS instead.
…WAABIZRfA-fKq8eVkFjK_F" height="300" width="500" frameborder="0"></iframe><br/>
我有什么办法可以消除这些错误(至少是第一个错误?另外,我最好还是检测JavaScript是否在服务器端使用,而不回显验证码吗?
reCAPTCHA PHP库将在现有目录中的DOM中再显示一个
站点http://www.google.com/recaptcha/api/noscript?k=your_public_key对我不起作用:404错误...