

var childS = this.childNodes;
for(var i=0; i
if(childS[i].nodeType==1)
anyString += childS[i].tagName=="BR" ? '\n' : childS[i].innerText;
else if(childS[i].nodeType==3)
anyString += childS[i].nodeValue;
}
return anyString;
}
);
}
catch(e){}
以下使用innerHTML实现的代码,其它更多的地方,大家自行测试因时间关系,不多说了。
[Ctrl+A 全选 注:如需引入外部Js需刷新才能执行]
