Low Level AJAX

Syntax of the low level AJAX function

$.ajax(options)

Example

<!DOCTYPE html>

<html>

<head>

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

<script type="text/javascript">

$(document).ready(function ()

{

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

{

$.ajax({ url: "Textfile.txt", success: function (result)

{

$("div").html(result);

}

});

});

});

</script>

</head>

<body>

<div><h2>AJAX change this text</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