AJAX in jQuery

AJAX and jQuery

Example

<!DOCTYPE html>

<html>

<head>

<script type="text/javascript" src="jquery.js"></script>

<script type="text/javascript">

$(document).ready(function () {

$("button").click(function () {

$("div").load('textfile.txt');

});

});

</script>

</head>

<body>

<div><h2>AJAX change this content</h2></div>

<button>Click here</button>

</body>

</html>

Output

op1.jpg

After click button

op2.jpg

You may also want to read these related articles here