【javascript】在Firefox中使用innerText

摘要:javascript-在Firefox中使用innerText

For javascript 備忘。

if(IsFireFox){
    HTMLElement.prototype.__defineGetter__( "innerText", function(){    
        return this.textContent;
    }
);    
    HTMLElement.prototype.__defineSetter__( "innerText", function(txt){    
        this.textContent=txt;
    }
);    
}