-
javascript怎么添加元素
方法:1、appendChild()方法在末尾插入新元素,语法“appendChild(newchild)”;2、insertBefore()方法,在开头插入新元素,新语法“insertBefore(newchild,refchild)”。
方法:1、appendChild()方法在末尾插入新元素,语法“appendChild(newchild)”;2、insertBefore()方法,在开头插入新元素,新语法“insertBefore(newchild,refchild)”。