0
처음으로 reCaptcha를 사용하려고하는데 이는 지금까지 쓴 코드이지만 작동하지 않는 것 같습니다.reCaptcha 첫 번째 타이머 문제
이Parameters application/x-www-form-urlencoded
'6LdUMuISAA1sIuE... =typeof RecaptchaState?null:RecaptchaState.challenge}'
Source
'6LdUMAA*******IuEmMAG4WV','www.example.com','fitsesq Accord','function(){return"undefined"==typeof RecaptchaState?null:RecaptchaState.challenge}'
내 문제가 있습니다 :
<script type="text/javascript">
function SubmitForm(){
var xmlHttp = new XMLHttpRequest();
xmlHttp.open("POST",'http://www.google.com/recaptcha/api/verify',true);
xmlHttp.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
params ="'6LdUMuISAAAAAMi4iDZ1sIuEmMK5cbR1pm1AG4WV','www.newimagespecialists.com','"+Recaptcha.get_response()+"','"+Recaptcha.get_challenge+"'";
xmlHttp.send(params);
xmlHttp.onreadystatechange=function(){
if(xmlHttp.readyState==4){
if(xmlHttp.status == 200){
form.submit();
}else{
return false;
}
}
}
}
</script>
이 내가 불을 지르고에서 무엇입니까 응답이 : 이것은 내 JS 코드
<form method="post" action=''>
<cfoutput>
<input type="hidden" name="isPost" value="1" />
First Name: <input type="text" name="firstname" placeholder="First name" required><br />
Last Name: <input type="text" name="lastname" placeholder="Last name" required><br />
Email: <input type="email" name="email" placeholder="[email protected]" required><br />
Zip Code: <input id="zip" type="text" pattern="[0-9]{5}" name="zipcodex" placeholder="ex." required /><br />
Home Phone: <input type="tel" pattern='[0-9]{10}' name="homephone" placeholder="ex. 3335551234" required><br />
Cell Phone: <input type="tel" pattern='[0-9]{10}' name="cellphone" value="#cellphone#" placeholder="ex. 99900"><br />
My Interest
<select class="interestOption" name="Formprocedure" id="procedure" required >
<option selected="selected" disabled="disabled" value="">My Interest</option>
<cfloop query="procedurefinder"><option <cfif procedureid eq Formprocedure>selected="selected" </cfif>title="#procedurename#" value="#procedureid#">#left(procedurename,20)#</option>
</cfloop>
</select><br />
<textarea name="comments" cols="50" rows="5" placeholder="Please enter any additional comments"></textarea><br />
<script type="text/javascript"
src="http://www.google.com/recaptcha/api/challenge?k=6LdUMuISAAAAA********mMK5cbR1pm1AG4WV">
</script>
<noscript>
<iframe src="http://www.google.com/recaptcha/api/noscript?k=6LdUMuISAAAAAMi**************mMK5cbR1pm1AG4WV"
height="50" width="400" frameborder="0"></iframe><br>
<textarea name="recaptcha_challenge_field" rows="3" cols="0">
</textarea>
<input type="hidden" name="recaptcha_response_field"
value="manual_challenge">
</noscript>
<br />
<button id="submit" onclick="SubmitForm();">Submit</button>
</cfoutput>
</form>
:
이
내 HTML 양식입니다 코드에 실수가있는 곳과 내 양식이 계속 제출되는 이유를 실제로 이해하지 못합니다. 어느 누구도 실수로 어디에서 포인터를 쓸 수 있습니까?
Nop는을 사용하여 reCAPTCHA를을 만드는 것이 확인은 여전히 양식을 통해 이동합니다. – Geo
@ 지오 : 코드에서 수동으로 양식을 제출하는 것을 보았습니다. formmitmit(); . –
@Geo : onsubmit = "return false"는 을 클릭했을 때 제출을 막기 위해서입니다. 그러나 자바 스크립트를 사용하여 양식을 제출하는 경우 스크립트 로직을 점검하고 form.submit()을 호출하지 않도록 수정해야합니다. –