日期:2014-05-16 浏览次数:20451 次
var a=1
function f1(){
this.n=10
}
f1.prototype.a=1
var obj=new f1()
alert(obj.n)
alert(obj.a)
var x={a:1,f1:function(){ this.n=10 }}
x.f1.prototype.a=1
x.obj=new x.f1()
alert(x.obj.n)
alert(x.obj.a)
var x={}
x.a=1
x.f1=function (){
this.n=10
}
x.f1.prototype.a=1
x.obj=new x.f1()
alert(x.obj.n)
alert(x.obj.a)
Ext = {
namespace : function(){
var o, d;
Ext.each(arguments, function(v) {
d = v.split(".");
o = window[d[0]] = window[d[0]]
------解决方案--------------------
{};
Ext.each(d.slice(1), function(v2){
o = o[v2] = o[v2]
------解决方案--------------------
{};
});
});
return o;
}
}