**html**

1.  <ul>
2.     <li>HTML</li>
3.     <li>CSS</li>
4.     <li>JS</li>
5.  </ul>
6. <ol>
7.     <li>第1项</li>
8.     <li>第2项</li>
9.     <li>第3项</li>
10.     <li>第4项</li>
11.     <li>第5项</li>
12.     <li>第6项</li>
13.     <li>第7项</li>
14. </ol>
15. <hr>
16. <b>Hello</b>
17. <p>, how are you?</p>
18. <script src="jquery.js"></script>
19. <script src="index.js"></script>

**JavaScript**

1. // 使用jquery创建标签并添加到页面上
2. // $('ul').append('<li>Node.js</li>')
3. // $('ul').append(document.querySelectorAll('ol li'))
4. // $('ol').append($('ul li'))
5.
6. // $('ul>li').append(function(index,html){
7. //     console.log(html)
8. //     return '<-><i>' + (index +1) + '</i>'
9. // })
10.
11. // $('<span>-------------</span>').appendTo('li')
12. // $('li').append('<span>-------------</span>')
13.
14. // $('ol,ul,body').prepend('<li>我有分身术</li>')
15. // $('li').after('<li>我是保镖1</>')
16. // $('li').before('<li>我是保镖2</>')
17. // $('<hr>').insertAfter('li:nth-child(1)')
18. // $('<hr>').insertBefore('li:first')
19.
20. // jQuery提供的包裹功能
21. // wrap()方法把每个被选元素放置在指定的HTML内容或元素中
22. // $('li').wrap('<a href="http://www.baidu.com"></a>')
23. // $('li').wrap(function(){
24. //     // console.log($(this).text())
25. //     var url = 'https://www.baidu.com/s?wd=' + $(this).text()
26.
27. //     return '<a href="' + url + '"></a>'
28. // })
29. // wrapAll在指定的html内容或元素中放置所有的被选元素
30. // $('li').wrapAll('<div></div>')
31. // $('li').wrapAll('<strong></strong>')
32. // $('li:nth-child(1)')
33. //    .wrapAll('<ul></ul>')
34. //    .first()
35. //    .css('color','red')
36. //    .end()
37. //    .last()
38. //    .css('color','blue')
39. //    .end()
40. //    .wrapInner(function(){
41. //        var url = 'https://www.baidu.com/s?wd=' + $(this).text()
42. //        return  '<a href="' + url + '"></a>'
43. //    })
44. // unwrap方法删除被选元素的父元素
45. // $('li:first').unwrap()
46.
47. // jQuery提供的替换功能
48. // $('li').replaceWith('<li>123</li>')
49. // $('<li>123</li>').replaceAll('li:odd')
50.
51. // jQuery提供的清空标签和删除标签自身的功能
52. // $('html').empty()
53. // $('html').remove()
54.
55. // detach()方法移除被选元素 包裹所有文本和子节点
56. // var hr = $('hr').detach()
57.
58. // setTimeout(function(){
59. //     $('ul').after(hr)
60. // },1000*10)
61.
62. // $('hr').click(function () {  
63. //     console.log('ffffffff')
64. //     alert('哎呦')
65. // })
66.
67. // $('ul').after($('hr')).clone(true,true)
68. // $("b").clone().prependTo("p");
69.
70.
71.