Jquery | 基础 | html()

 1 <!DOCTYPE html>
 2 <html lang="en">
 3 
 4 <head>
 5     <meta charset="UTF-8">
 6     <meta name="viewport" content="width=device-width, initial-scale=1.0">
 7     <meta http-equiv="X-UA-Compatible" content="ie=edge">
 8     <title>Document</title>
 9     <style type="text/css">
10         div {
11             padding: 8px 0px;
12             font-size: 12px;
13             text-align: center;
14             border: solid 1px #888;
15         }
16     </style>
17     <script src="jquery-3.3.1.min.js" type="text/javascript"></script>
18     <script type="text/javascript">
19         $(document).ready(function () {
20             $("div").html("您好!欢迎来到jQuery的精彩世界。");
21         });
22     </script>
23 </head>
24 
25 <body>
26     <div></div>
27 </body>
28 
29 </html>

原文地址:https://www.cnblogs.com/jj81/p/9800944.html