function Person(_name,_age,_fun) { name=_name; age=_age; this.myFun=_fun; } var p1 = new Person("王平",20,jisuan); document.writeln(p1.name); document.writeln(p1.myFun(3,2,"+")); var dog={name:'小狗',age:10,fun1:function(){document.writeln('我是小狗'+this.name);},fun2:function(){document.writeln('我的年龄是'+this.age+'岁');}}; dog.fun1(); dog.fun2();