<p id="p">hello world</p><script> var p = document.getElementById("p"); p.before("前面") p.after("后面")</script>