welcome.txt
欢迎学习jQuery编程技术
t318.html
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Title</title>
<script src="../../js/jquery-3.5.1.js"></script>
<script>
//load方法
//获取扩展名为txt的文件内容
$(function () {
$("#wrapper").load("welcome.txt");
});
</script>
</head>
<body>
<div id="wrapper"></div>
</body>
</html>