87,923
社区成员
发帖
与我相关
我的任务
分享
<script>
var Class = {
create: function()
{
return function()
{
this.initialize.apply(this, arguments);
}
}
}
var C = Class.create();
C.prototype = {
initialize: function(name,age){
this.name = name;
this.age = age;
}
}
var c = new C('hansir','30');
alert(c.name); // hansir
alert(c.age); // 30
</script>