方法:
insertAdjacenthtml(postion,html);
insertAdjacentTEXT(postion,text);
廣州vi設計公司 http://www.maiqicn.com 我的007辦公資源網 https://www.wode007.com
參數:
position 是相對於 element 元素的位置,並且只能是以下的字符串之一:
1. beforeBegin: 插入到標簽開始前
2. afterBegin:插入到標簽開始標記之后
3. beforeEnd:插入到標簽結束標記前
4. afterEnd:插入到標簽結束標記后
html 是 需要添加的標簽節點
text 是文本