<script>
window.onload = function(){
function Interest(){
var global = this;
global.interestList = function(){
alert('basketball、football、table tennis');
}
}
function Student(){
var global = this;
global.name = 'jQ';
global.age = 20;
Interest.apply(global,arguments);//可见 Student 继承了 Interest 的属性和方法
}
var student = new Student();
}
</script>