下面是不是第二个更好用!
<script>var life = {};
                     life.age=12;
                    life.body = "cell of";
                    life.say = function(){alert(this.age+this.body)}; 
        life.say(); 
     </script
script type="text/javascript">
<!--
function Life(){
    this.age = 12;
    this.body = "cell of";
}
Life.prototype.say = function(){
    alert(this.age + ' ' + this.body);
}var life = new Life();
life.say();
//-->
</script