<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>函数</title>
</head>
<body>
<script type="text/javascript">
/*函数:
arguments
prototype 原型 对象
call
apply*/
//人对象
function Person(name,age){
this.name=name;
this.age=age;
}
Person.prototype.say=function(){
console.log(this.name+' 说话');
};
var p=new Person('小花',20);
p.say();
console.log(Person);
console.log(Person.prototype);
</script>
</body>
</html>
函数的一些属性和方法
猜你喜欢
转载自blog.csdn.net/weixin_44606660/article/details/87877186
今日推荐
周排行