一个简单js框架的实现过程

#javascript代码#function getStyle(obj,attr){ if(obj.currentStyle){ return obj.currentStyle[attr]; }else{ return getComputedStyle(obj,false)[attr]; }}function addEvent(obj,type,fn){ if(ob...请戳→ #前端开发博客# ​​​