The insertbefore ( ) method is used to insert a node before a specific node 方法在指定的現(xiàn)有節(jié)點(diǎn)之前插入了一個(gè)節(jié)點(diǎn)。
If no reference node is provided , is at the end of the collection 如果未提供任何參考節(jié)點(diǎn),則insertbefore的默認(rèn)位置是集合的末尾。
The insertbefore ( ) method inserts a new child node before an existing child node 方法的作用是:在現(xiàn)有的子節(jié)點(diǎn)前插入一個(gè)新的子節(jié)點(diǎn)。
Method . these methods take , as a parameter , an existing node as a reference point to do the 這些方法(作為參數(shù))將現(xiàn)有節(jié)點(diǎn)作為執(zhí)行insertbefore和insertafter的參考點(diǎn)。