FF innerText(转载)
2010-03-31 14:14 爱研究源码的javaer 阅读(403) 评论(0) 编辑 收藏 举报
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
转自:http://hi.baidu.com/ifos/blog/item/dd619f1cba2dff8a87d6b687.html