我在一个项目中工作,大部分时间我都必须导入computed style
...html divs
所以我尝试在下创建一个自定义prototype
,Object
以使我的代码变得更好、更简单、更短......这是适合我的代码...
Object.prototype.css=function(){
return window.getComputedStyle(this);
}
什么时候var a
是node
一个html div
,我需要height
那个div
,我必须使用prototype
下面的...
a.css().height;
现在的问题是......我怎样才能修改我function
的使用prototype
...
a.css.height; // css insead of css()
请不要 jQuery...