【问题标题】:Captcha in MEAN jsMEAN js中的验证码
【发布时间】:2019-03-21 22:04:16
【问题描述】:

我需要在 MEAN js 登录中使用验证码。我需要最简单的方法来使它工作。我看到了Visual Captcha,但我无法理解在 MEAN js 应用程序中应该在哪里使用它。

我需要 MEAN js 应用上的离线验证码解决方案。我打算将它部署在树莓派上。

【问题讨论】:

    标签: node.js captcha mean-stack meanjs


    【解决方案1】:

    您可以在平均堆栈页面中使用带有外部脚本文件的 google recaptcha。有一个js代码。

    https://developers.google.com/recaptcha/docs/display#js_api

    按照这个来。

        <script type="text/javascript">
          var onloadCallback = function() {
            grecaptcha.render('html_element', {
              'sitekey' : 'your_site_key'
            });
          };
        </script>   </head>   <body>
        <form action="?" method="POST">
          <div id="html_element"></div>
          <br>
          <input type="submit" value="Submit">
        </form>
        <script src="https://www.google.com/recaptcha/api.js?onload=onloadCallback&render=explicit"
            async defer>
        </script>   </body> ```
    
    
    

    【讨论】:

      猜你喜欢
      • 2016-11-15
      • 2017-11-09
      • 2015-11-16
      • 1970-01-01
      • 2017-06-14
      • 2012-07-26
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多