js 获取子节点,兼容FF,IE

代码
function getFirstChild(obj) {
var result = obj.firstChild;
while (!result.tagName) {
result 
= result.nextSibling;
}
return result;
}

function getNextChild(obj) {
var result = obj.nextSibling;
while (!result.tagName) {
result 
= result.nextSibling;
}
return result;


posted @ 2010-04-16 14:13  {前端开发}  阅读(550)  评论(0编辑  收藏  举报