code in head section of the html document -Â
$("#our_button").click(function(){
 $.ajax({ url: "external_content.txt", success: function(result) {
  $("#our_div").html(result);
 }});
});
Code in body section of html document -Â
<div id="our_div">Let jquery ajax change this text </div>
<button id="our_button">bring external content</button>Â
here when the our_button clicked, it shows the external content of a txt file in the our_div element using ajax. The parameters in the ajax request are the name: value pairs. there are many parameters, search through google.com.
Â