2016-12-06 294 views
2

我在Firefox中显示reCaptcha时遇到问题(版本50.0.2)and Safari browsers(Ver 9.1).在IE和Chrome中显示正常。我使用的代码是来自google recaptcha文档的示例代码。我将以下示例代码保存到一个html文件中(并将其命名为myReCaptcha.html)。我用我自己的网站密钥取代了“my_own_site_key”。我试图用这个链接“127.0.0.1/myReCaptcha.html”显示它。它在IE和Chrome浏览器中显示得很好,但在Firefox和Safari浏览器中显示效果不错。请帮忙。谢谢。在Firefox和Safari浏览器中未显示recaptcha

<html> 
    <head> 
    <title>reCAPTCHA demo: Simple page</title> 
    <script src="https://www.google.com/recaptcha/api.js" async defer></script> 
    </head> 
    <body> 
    <form action="?" method="POST"> 
     <div class="g-recaptcha" data-sitekey="my_own_site_key"></div> 
     <br/> 
     <input type="submit" value="Submit"> 
    </form> 
    </body> 
</html> 

P.S. Here is what I see in the Chrome browser. But I can't see it in Firefox.

+0

在我的FF中,recaptcha显示得很好。你有没有安装任何可能阻止它的插件?http://plnkr.co/edit/rFZ0ABLJfuULdQevqJ2n?p = preview –

+0

我现在只有一个插件,即“All Aboard 1.5.6(disabled)”。我尝试了你的链接,但是我没有在FF中看到我的屏幕上出现reCaptcha。 – cella3182

+0

您是否能够在我的抢劫者身上看到验证码?你在控制台中有任何错误吗? –

回答

0

显然,这是一个已知的问题,与https:版本widget的。该演示是在Firefox

工作对我罚款

https://secure.jotformpro.com/form/50145268709963

<html><head> 
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> 
<link rel="alternate" type="application/json+oembed" href="https://www.jotform.com/oembed/?format=json&amp;url=http%3A%2F%2Fwww.jotform.com%2Fform%2F50145268709963" title="oEmbed Form"><link rel="alternate" type="text/xml+oembed" href="https://www.jotform.com/oembed/?format=xml&amp;url=http%3A%2F%2Fwww.jotform.com%2Fform%2F50145268709963" title="oEmbed Form"> 
<meta property="og:title" content="Google - Recaptcha demo" > 
<meta property="og:url" content="http://www.jotformpro.com/form/50145268709963" > 
<meta property="og:description" content="Please click the link to complete this form."> 
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=0" /> 
<meta name="HandheldFriendly" content="true" /> 
<title>Google - Recaptcha demo</title> 
<link href="https://cdn.jotfor.ms/static/formCss.css?3.3.15949" rel="stylesheet" type="text/css" /> 
<link type="text/css" rel="stylesheet" href="https://cdn.jotfor.ms/css/styles/nova.css?3.3.15949" /> 
<link type="text/css" media="print" rel="stylesheet" href="https://cdn.jotfor.ms/css/printForm.css?3.3.15949" /> 
<style type="text/css"> 
    .form-label-left{ 
     width:150px !important; 
    } 
    .form-line{ 
     padding-top:12px; 
     padding-bottom:12px; 
    } 
    .form-label-right{ 
     width:150px !important; 
    } 
    body, html{ 
     margin:0; 
     padding:0; 
     background:false; 
    } 

    .form-all{ 
     margin:0px auto; 
     padding-top:20px; 
     width:690px; 
     color:#555 !important; 
     font-family:"Lucida Grande", "Lucida Sans Unicode", "Lucida Sans", Verdana, sans-serif; 
     font-size:14px; 
    } 
</style> 

<script src="https://cdn.jotfor.ms/static/prototype.forms.js" type="text/javascript"></script> 
<script src="https://cdn.jotfor.ms/static/jotform.forms.js?3.3.15949" type="text/javascript"></script> 
<script src="https://js.jotform.com/vendor/postMessage.js?3.3.15949" type="text/javascript"></script> 
<script src="https://js.jotform.com/WidgetsServer.js?v=1481065067325" type="text/javascript"></script> 
<script type="text/javascript"> 
    JotForm.init(function(){ 
     setTimeout(function() { 
      $('input_5').hint('ex: [email protected]'); 
     }, 20); 
    JotForm.clearFieldOnHide="disable"; 
    JotForm.onSubmissionError="jumpToFirstError"; 
    }); 
</script> 
</head> 
<body> 
<form class="jotform-form" action="https://submit.jotformpro.com/submit/50145268709963/" method="post" name="form_50145268709963" id="50145268709963" accept-charset="utf-8"> 
    <input type="hidden" name="formID" value="50145268709963" /> 
    <div class="form-all"> 
    <ul class="form-section page-section"> 
     <li class="form-line" data-type="control_textbox" id="id_4"> 
     <label class="form-label form-label-left form-label-auto" id="label_4" for="input_4"> Name </label> 
     <div id="cid_4" class="form-input jf-required"> 
      <input type="text" class=" form-textbox" data-type="input-textbox" id="input_4" name="q4_name" size="20" value="" /> 
     </div> 
     </li> 
     <li class="form-line jf-required" data-type="control_email" id="id_5"> 
     <label class="form-label form-label-left form-label-auto" id="label_5" for="input_5"> 
      E-mail 
      <span class="form-required"> 
      * 
      </span> 
     </label> 
     <div id="cid_5" class="form-input jf-required"> 
      <input type="email" class=" form-textbox validate[required, Email]" id="input_5" name="q5_email5" size="30" value="" /> 
     </div> 
     </li> 
     <li class="form-line jf-required" data-type="control_widget" id="id_6"> 
     <label class="form-label form-label-left form-label-auto" id="label_6" for="input_6"> 
      Recaptcha 
      <span class="form-required"> 
      * 
      </span> 
     </label> 
     <div id="cid_6" class="form-input jf-required"> 
      <div style="width:100%; text-align:Left;"> 
      <iframe onload="widgetFrameLoaded(6)" frameborder="0" scrolling="no" allowTransparency="true" data-type="iframe" class="custom-field-frame" id="customFieldFrame_6" src="" style="border:none;width:310px;height:85px;" data-width="310" data-height="85"> 
      </iframe> 
      <div class="widget-inputs-wrapper"> 
       <input id="input_6" class="form-hidden form-widget widget-required " type="hidden" name="q6_recaptcha" value="" /> 
       <input id="widget_settings_6" class="form-hidden form-widget-settings" type="hidden" value="%5B%7B%22name%22%3A%22theme%22%2C%22value%22%3A%22light%22%7D%2C%7B%22name%22%3A%22fallback%22%2C%22value%22%3A%22false%22%7D%5D" data-version="2" /> 
      </div> 
      <script type="text/javascript"> 
      setTimeout(function() 
{ 
    var _cFieldFrame = document.getElementById("customFieldFrame_6"); 
    _cFieldFrame.src = "//dev-data-widgets.jotform.io/kenneth/noCaptchaRecaptcha/?qid=6&ref=" + encodeURIComponent(window.location.protocol + "//" + window.location.host); 
    _cFieldFrame.addClassName("custom-field-frame-rendered"); 
}, 0); 
      </script> 
      </div> 
     </div> 
     </li> 
     <li class="form-line" data-type="control_button" id="id_2"> 
     <div id="cid_2" class="form-input-wide"> 
      <div style="margin-left:156px;" class="form-buttons-wrapper"> 
      <button id="input_2" type="submit" class="form-submit-button" data-component="button"> 
       Submit 
      </button> 
      </div> 
     </div> 
     </li> 
     <li style="display:none"> 
     Should be Empty: 
     <input type="text" name="website" value="" /> 
     </li> 
    </ul> 
    </div> 
    <input type="hidden" id="simple_spc" name="simple_spc" value="50145268709963" /> 
    <script type="text/javascript"> 
    document.getElementById("si" + "mple" + "_spc").value = "50145268709963-50145268709963"; 
    </script> 
    <script src="https://cdn.jotfor.ms/js/widgetResizer.js?REV=3.3.15949" type="text/javascript"></script> 
</form></body> 
</html> 
+0

我使用了你的链接并把它放在我的firefox中,我没有看到reCaptcha。必须有一些特定于我的Firefox配置/设置,阻止它在我的Firefox。我不知道该配置/设置应该是什么。我一直在为这个问题挣扎两天。 。 https://secure.jotformpro.com/form/50145268709963 – cella3182

+0

有些奇怪的事情必须与您的Firefox安装程序一起进行。你能给我链接到你的网站只是为了检查它? –

0

一对夫妇的斗争几天后,我想我想通为什么会发生。我在我公司的内部网上运行reCpatcha。在我的FF中,* .google.com的证书显示为由我的公司颁发。因此,如果我在公司的Intranet上运行reCaptcha代码,我将不会看到reCaptcha。但是如果我在互联网上运行reCaptcha,我会看到它。所以这是我公司的安全政策阻止了reCaptcha的出现。