1 HTMLElement.prototype.__defineGetter__("currentStyle", function () { 2 return this.ownerDocument.defaultView.getComputedStyle(this, null); 3 });
example:
1 document.body.currentStyle['width']
1 HTMLElement.prototype.__defineGetter__("currentStyle", function () { 2 return this.ownerDocument.defaultView.getComputedStyle(this, null); 3 });
example:
1 document.body.currentStyle['width']
转载于:https://www.cnblogs.com/mahatmasmile/p/3267699.html