与IE不兼容的重新获取码V2

问题描述 投票:0回答:1

我试过在头部添加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 jquery internet-explorer recaptcha react-google-recaptcha
1个回答
1
投票

你应该包含必要的JavaScript资源,像这样。

<script src='https://www.google.com/recaptcha/api.js'></script>

另外,在 data-sitekey 属性。

结果在IE中是这样的。

enter image description here

如果在IE11中还是不行的话 你可以用F12开发工具在控制台中检查是否有错误。


0
投票

其实在IE中第一次加载就已经加载好了。所以,我试着让url每次都不一样,附加当前日期时间。

"https:/www.google.comrecaptchaapi.js?render=" + EncodeUrl(SiteKey) + "&time="+CurrTime()

它开始工作。

© www.soinside.com 2019 - 2024. All rights reserved.