/*获取元素的第一个元素孩子*/ function first(tag) { var tag = tag.firstChild; while(tag && tag.nodeType != 1){ tag=tag.nextSibling; } return tag; }