<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
<title></title>
<meta charset="utf-8" />
<script src="jquery-3.3.1.js"></script>
<script>
$(function () {
$('#btn').click(function () {
//每对p标签都会用font标签包裹
//$('div p').wrap('<font color="blue" size="7" face="全新硬笔行书简"></font>');
//所有的p标签都被一对font标签包裹
//$('div p').wrapAll('<font color="blue" size="7" face="全新硬笔行书简"></font>');
//把p标签的文字内容用font包裹起来,但是p标签在外面
$('div p').wrapInner('<font color="blue" size="7" face="全新硬笔行书简"></font>');
})
})
</script>
</head>
<body>
<input type="button" name="name" value="btn" id="btn"/>
<div>
<p>这是p</p>
<p>这也是p</p>
</div>
</body>
</html>