Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/javascript/417.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/9/java/310.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Javascript 与IE不兼容的Recaptcha V2_Javascript_Java_Internet Explorer_Recaptcha_React Google Recaptcha - Fatal编程技术网

Javascript 与IE不兼容的Recaptcha V2

Javascript 与IE不兼容的Recaptcha V2,javascript,java,internet-explorer,recaptcha,react-google-recaptcha,Javascript,Java,Internet Explorer,Recaptcha,React Google Recaptcha,我已尝试将meta标记添加到标题: 但它不起作用 我尝试了这个选项,但实际上仍然不起作用,因为兼容视图中没有google.com 有人能帮我吗 <!DOCTYPE html> <html lang="en"> <head> <title>How to Integrate Google “No CAPTCHA reCAPTCHA” on Your Website</title> <script src='google.com/rec

我已尝试将meta标记添加到标题:

但它不起作用

我尝试了这个选项,但实际上仍然不起作用,因为兼容视图中没有google.com

有人能帮我吗

<!DOCTYPE html> <html lang="en"> <head> <title>How to Integrate Google “No CAPTCHA reCAPTCHA” on Your Website</title> <script src='google.com/recaptcha/api.js'></script> </head> <body> <form action="" method="post"> <label for="name">Name:</label> <input name="name" required><br /> <label for="email">Email:</label> <input name="email" type="email" required><br /> <div class="g-recaptcha" data-sitekey="###"></div> <input type="submit" value="Submit" /> </form>

您应该包括必要的JavaScript资源,如下所示:

<script src='https://www.google.com/recaptcha/api.js'></script>
此外,在“数据站点密钥”属性中设置正确的站点密钥

IE中的结果如下所示:


如果它在IE 11中仍然不起作用,您可以使用F12开发工具来检查控制台中是否有任何错误。

实际上它是在IE中第一次加载的。所以,我每次都尝试通过添加当前日期时间来改变url

+EncodeUrlSiteKey+&time=+CurrTime


它开始工作。

你能给我们看看你的代码吗?如何在您的网站上集成Google“No CAPTCHA reCAPTCHA”,您是以文件的形式打开://还是使用web服务器?您确定您使用了有效的源url吗?是的,我使用了有效的源url是的,我在脚本标记中设置了有效的密钥和精确的src文件,并且控制台中没有错误。但它仍然没有显示出来。我正在使用IE11。它在边缘处工作得很好@lovishgoel为什么不添加https://www. 在src的开始?我在我的身边测试,如果我移除了https://www. 在src中,它不会显示在IE中。请使用这个:src=https://www.google.com/recaptcha/api.js,不是这个:src='google.com/recaptcha/api.js',然后清除浏览器缓存并重试。@Yu Zhou,是的,我正在做同样的事情,但没有工作。我只是复制并粘贴评论,所以它跳过https:\\www。我使用的是正斜杠,但当我在这里键入时,它会删除https://part并创建一个链接。您使用的是哪个版本的IE?请检查网站使用的浏览器模式,并在html标题上添加此元,以确保网站在IE中以最新模式呈现。感谢您发布此问题的解决方案。您可以在48小时后将您的答案标记为可接受的答案,此时可进行标记。它可以在将来帮助其他社区成员解决类似的问题。谢谢你的理解。