-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy pathindex.html
More file actions
56 lines (55 loc) · 2.16 KB
/
index.html
File metadata and controls
56 lines (55 loc) · 2.16 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
<html>
<head>
<title>Google recapcha using Node.js demo - Codeforgeek</title>
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<h1>Google reCAPTHA Demo using Node.js</h1>
<title>Google recapcha demo - Codeforgeek</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<script src='https://www.google.com/recaptcha/api.js'></script>
</head>
<body>
<nav class="navbar navbar-default navbar-fixed-top">
<div class="navbar-header" style='margin-left : 18%'>
<script async src="//pagead2.googlesyndication.com/pagead/js/adsbygoogle.js"></script>
<!-- leaderboard-2 -->
<ins class="adsbygoogle"
style="display:inline-block;width:728px;height:90px"
data-ad-client="ca-pub-1093991142748141"
data-ad-slot="2273512127"></ins>
<script>
(adsbygoogle = window.adsbygoogle || []).push({});
</script>
</div>
</nav>
<div class='form-group' style="margin-top: 100px; width : 600px; margin-left : 25%;">
<h1>Google recaptcha using Node.js</h1>
<form id="comment_form" action='/submit' method="post">
<input type="email" placeholder="Type your email" size="40"><br><br>
<textarea name="comment" rows="8" cols="39"></textarea><br><br>
<div class="g-recaptcha" data-sitekey="6LcX1v4SAAAAAOf5ffTwmpYwTx07N5Df5ztmSkde"></div><br>
<input type="submit" name="submit" value="Post comment"><br><br>
</form>
</div>
</body>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.7.1/jquery.min.js"></script>
<script src="http://cdnjs.cloudflare.com/ajax/libs/jquery.form/3.51/jquery.form.min.js"></script>
<script src='https://maxcdn.bootstrapcdn.com/bootstrap/3.3.6/js/bootstrap.min.js'></script>
<script>
$(document).ready(function() {
$('#comment_form').submit(function() {
$(this).ajaxSubmit({
error: function(xhr) {
status('Error: ' + xhr.status);
},
success: function(response) {
alert(response.responseDesc);
}
});
//Very important line, it disable the page refresh.
return false;
});
});
</script>
</html>