Step 1:Create index.html to impelement below code
<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div> <button class="btn btn-success">Get External Content</button>
<h1>AJAX</h1> <p>AJAX is not a programming language.</p> <p>AJAX is a technique for accessing web servers from a web page.</p> <p>AJAX stands for Asynchronous JavaScript And XML.</p>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div1").load("demo_test.txt");
});
});
</script>
<!DOCTYPE html>
<html>
<head>
<title>How To Change Text Using Ajax And Jquery With Example</title>
<meta charset="utf-8">
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
</head>
<style>
body {
background: black;
}
</style>
<body>
<div class="container">
<br><br>
<div class="text-center">
<h2 id="color" style="color: White;">How To Change Text Using Ajax And Jquery</h2>
</div>
<br>
<div class="well">
<div id="div1"><h2>Let jQuery AJAX Change This Text</h2></div>
<button class="btn btn-success">Get External Content</button>
</div>
</div>
</body>
</html>
<script>
$(document).ready(function(){
$("button").click(function(){
$("#div1").load("demo_test.txt");
});
});
</script>