标签:color function func nbsp name code class fun pre
1构造函数
function Student(name) { this.name = name; this.hello = function () { alert(‘Hello, ‘ + this.name + ‘!‘); } } //调用 var xiaoming = new Student(‘小明‘); xiaoming.name; // ‘小明‘ xiaoming.hello();
标签:color function func nbsp name code class fun pre
原文地址:https://www.cnblogs.com/devops-qxw/p/9938668.html