x
 
<html>
<head>
<script type="text/javascript" src="/jquery/jquery.js"></script>
<script type="text/javascript">
$(document).ready(function(){
  $("button").click(function(){
    $("p").wrap(function(){
      return "<div></div>"
    });
  });
});
</script>
<style type="text/css">
div{background-color:yellow;padding:10px;}
</style>
</head>
<body>
<p>这是一个段落。</p>
<button>用 div 元素来包围 p 元素</button>
</body>
</html>