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>