<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <script src="../js/jquery-3.5.1.js"></script>
    <script>
        $(function () {
            //替换元素
            //$(A).replaceWith(B) ,表示用B来替换A
           $("#btn1").click(function () {
               $("strong").replaceWith("<a href='http://www.baidu.com'>百度</a>");
           });
        });
    </script>
</head>
<body>
    <strong>jQuery教程</strong><br>
    <input type="button" id="btn1" value="替换">
</body>
</html>