亚洲乱码中文字幕综合,中国熟女仑乱hd,亚洲精品乱拍国产一区二区三区,一本大道卡一卡二卡三乱码全集资源,又粗又黄又硬又爽的免费视频

使用insertAfter()方法在現(xiàn)有元素后添加一個(gè)新元素

 更新時(shí)間:2014年05月28日 17:47:40   作者:  
為javascript添加insertAfter()方法即在現(xiàn)有元素后添加一個(gè)新元素,示例如下,大家不妨學(xué)習(xí)下
復(fù)制代碼 代碼如下:

//在現(xiàn)有元素后添加一個(gè)新元素
function insertAfter(newElement, targetElement){
var parent = targetElement.parentNode;
if (parent.lastChild == targetElement){
parent.appendChild(newElement);
} else {
parent.insertBefore(newElement,targetElement.nextSibling);
}
}

相關(guān)文章

最新評(píng)論