prototype的问题
var f = function() { this.i() };
f.prototype.i = function() { alert( 'd '); };
var dd = new f();
为什么f.prototype.i明明在this.i()后面
却能执行
------解决方案--------------------
因为var dd = new f();在最后面~~~
编辑:chaxungu时间:2022-10-02 23:22:45分类:web开发
下一篇:读取xml节点的奇怪有关问题