function replaceNodeText(id,newText){
var node = document.getElementById(id);
while(node.firstChild)
node.removeChild(node.firstChild);
node.appendChild(document.creatTextNode(newText));
}
替换节点内文本的万用函数
原文:http://www.cnblogs.com/f2e520/p/4912586.html