Bootstrap

js 面向对象的语法示例

func.js

 var people = {
        getName:function(name){
         return name;
        },
        getAge:function(age) {
         return age;
        }
    };

 

 

test.htm

<script type="text/javascript" src="func.js"></script>

<script>
alert(people.getName("tom"));

</script>

;