有个append()函数,相当于dom中的document.appendChild()函数,如下图:
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
    <title></title>
    <script src="JScript/jquery-1.9.1.js" type="text/javascript"></script>
    <script type="text/javascript">
        $(function () {
            var link = $("<a href='http://www.sina.com'>新浪连接</a>");
            $("body").append(link);
            link.text("搜狗");
           
        });
    </script>
</head>
<body>

</body>
</html>

 

相关文章:

  • 2021-10-19
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-28
  • 2021-07-01
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2022-01-18
  • 2022-12-23
  • 2021-12-14
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-09-13
相关资源
相似解决方案