<html>
<head>
<meta charset="utf-8">
<title>Jquery Totorial</title>
</head>
<body>
<input type="text" id="name"><input id="boton" type="button" value="Load">
<div id="content"></div>
<script type="text/javascript" src="js/jquery.js"></script>
<script type="text/javascript" src="js/ajaxcall.js"></script>
</body>
</html>
$('#boton').click(function(){
var name = $('#name').val();
$.ajax({
url:'php/send.php',
data:'name='+name,
success: function(data){
$('#content').html(data);
}
}).error(function(){
alert('Error de pagina');
}).complete(function(){
alert('Complete');
});
});
No hay comentarios:
Publicar un comentario