var t = {d:'dd','b':'bb',c:{a:function (){alert('dddd');}}};
function test (obj)
{
this.d='fdfd';
this.b='dfd';
{
this[tmp]=obj[tmp];
}
}
var s = new test(t);
alert(s.d);
var x = {c:{a:function (){alert('dxxx');}}};
var s2 = new test(x);
alert(typeof(s2.c.a));
function test (obj)
{
this.d='fdfd';
this.b='dfd';
var tmp;
//遍历对象
{
this[tmp]=obj[tmp];
}
}
var s = new test(t);
alert(s.d);
var x = {c:{a:function (){alert('dxxx');}}};
var s2 = new test(x);
alert(typeof(s2.c.a));