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
| <html>
<head>
<link rel="stylesheet" type="text/css" href="bootstrap.min.css">
<script src="http://code.jquery.com/jquery-1.9.1.min.js"></script>
<script>
$('#f').click(function(){
kiko=document.getElementById("pseudo").value;
alert(kiko);
$.ajax({
type: "POST",
url: "2.php",
data: "datos="+kiko,
success: function(datos){
if(datos=="1")
{alert("Ha habido un error al envia");}
}
});
}) ;
</script>
</head>
<body>
<center>
<form class="well form-inline" method="post" action="">
<a class="btn btn-danger" href="2.php" id="f">Regístrate</a>
<input type="text" style="height: 30px" class="span4" placeholder="Pseudo" id="pseudo" />
</form>
<center>
</body>
</html> |
Partager