<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title></title>
<script src="js/jquery.js"></script>
</head>
<body>
<div>
<p id="show">我是文字</p>
</div>
<p>我是文字</p>
<input type="button" value="修改">
<script type="text/javascript">
$(function () {
$(":button").on("click",function () {
$("#show").text("我是子元素")
})
})
</script>
</body>
</html>
效果