This repository has been archived by the owner on May 6, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
/
index.html
executable file
·78 lines (75 loc) · 2.66 KB
/
index.html
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
<<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Formulario de contacto</title>
<link rel="stylesheet" href="inc/style.css">
<script type="text/javascript" src="http://code.jquery.com/jquery-1.3.1.min.js"></script>
</head>
<body>
<<section>
<form id="contact-form" name="contact-form" method="post" action="javascript:void(0);">
<input type="text" name="name" id="name" placeholder="Nombre completo" required/>
<input type="text" name="email" id="email" placeholder="Email" required />
<input type="text" name="phone" id="phone" placeholder="Teléfono" required/>
<input type="text" name="guvenlikKodu" id="guvenlikKodu" placeholder="Ingresa el código de la imagen" required />
<img style="margin-top: 10px; border: 10px solid #fff;" src="inc/captcha.php" />
<textarea style="text-transform: none; display: block; font-family: Arial; height: 303px;" id="text" name="text" id="text" cols="35" rows="8" placeholder="Escribe tu mensaje..." required/></textarea>
<input class="btn btn-primary btn-block" type="submit" onclick="kontrolet()" value="ENVIAR MENSAJE AHORA" />
</form>
<div style="margin-top: 20px" id="send">
</section>
<script type="text/javascript">
function gostergizle()
{
$("div#container").show(100);
}
function sendmessage(){
var veriler = $('#contact-form').serialize();
$.ajax({
type: "POST",
url: "inc/send.php",
data: veriler,
success:function(cevap){
$("#send").html(""+cevap);
$("div#container").hide(100);
}
})};
function formReset(id) {
$('#'+id).each(function(){
this.reset();
});
}
function kontrolet(){
$('input[type="submit"]').attr('disabled','disabled');
var name=$('#name').val();
name=jQuery.trim(name);
var email=$('#email').val();
email=jQuery.trim(email);
var mess=$('#text').val();
mess=jQuery.trim(mess);
var tel=$('#phone').val();
tel=jQuery.trim(tel);
var guvenlikKodu=$('#guvenlikKodu').val();
guvenlikKodu=jQuery.trim(guvenlikKodu);
if(name==''){
alert("Verifica tu nombre");
}
else if(email==''){
alert("Verifica tu correo");
}
else if (tel==''){
alert("Verifica tu teléfono");
}
else if(mess==''){
alert("Verifica tu mensaje");
}
else if (guvenlikKodu==''){
alert("¡Ingresa el código de la imagen!");
}
else { sendmessage() }
}
</script>
</body>
</html>