FF innerText(转载)

var o={ oText:function(obj){ var text; switch(typeof obj.innerText){ case 'string': text=obj.innerText; break; case 'undefined': text=obj.textContent; break; default: break; } return text; }, sText:function(obj,s){ switch(typeof obj.innerText){ case 'string': obj.innerText=s; break; case 'undefined': obj.textContent=s; break; } }, oHtml:function(obj){ return obj.innerHTML; }, sHtml:function(obj,s){ obj.innerHTML=s; } };

转自:http://hi.baidu.com/ifos/blog/item/dd619f1cba2dff8a87d6b687.html
原文地址:https://www.cnblogs.com/johnwonder/p/1701363.html