martes, 24 de marzo de 2015

Ajax send

<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/ajaxsend.js"></script>
       
    </body>
</html>

send.js

$('#boton').click(function(){
var name = $('#name').val();
$.ajax({
    url:'php/send.php',
    data:'name='+name,
    success: function(data){
        $('#content').html(data);
    }
});

});

No hay comentarios:

Publicar un comentario