一:关机菜单添加飞行模式选项 源码路径:frameworks/base/core/res/res/values/config.xml 增加<item>airplane</item> <!-- Defines the default set of global actions. Actions may still be disabled or hidden based on the current state of the device. Each item must be o
前面谈到了javascript的类式继承.这篇继续部分类式继承,及一些现代继承. 类式继承模式-代理构造函数 这种模式通过断开父对象与子对象之间原型之间的直接链接关系,来解决上次说到的共享一个原型所带来的问题,而且同时可以继续原型链带来的好处. 代码: function inherit(C,P){ var F = function(){}; F.prototype = P.prototype; C.prototype = new F(); } 可以看到,在这里面有一个空构造函数F(),充当了子对