$( "#result" ).load( "ajax/test.html" );
Syntex
$(selector).load(URL, data, callback);
Example:
$('#loadhere').load('file.html');
<div id="loadhere"></div>
// this page loads the file "data.txt" when the button is clicked.
// This file is index.php.
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="stylesheet"/>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.6.0/jquery.min.js"></script>
<script>
$(document).ready(function(){
$("#btn").click(function() {
$("#content").load("data.txt");
});
})
</script>
</head>
<body>
<div id="content"></div>
<br>
<button id="btn">Press Me</button>
</body>
</html>