在prototype上添加方法,目的是让所有实例都能直接使用该方法。Base可认为是基类,扩展自Base的部件,如Widget1的实例,new Widget1,就可以实现继承Base中的方法“css"。
假如attr = 'background',style[attr] 和 style.attr的区别是,前者等价于style['background'] 或style.background,后者等价于style['attr']