index.html
<html>
<head>
<meta charset="utf-8">
<title>Jquery Totorial</title>
</head>
<body>
<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/ajax.js"></script>
</body>
</html>
ajax.js
$('#boton').click(function(){
$.ajax({
url:'page.html',
success: function(data){
$('#content').html(data);
}
});
});
No hay comentarios:
Publicar un comentario