function Person(name, age, job) { this.name = name; this.age = age; this.job = job; this.sayName = sayName; } function sayName() { alert(this.name); } var person1 = new Person("Nicholas", 19, "Teacher"); var person2 = new Person("Greg", 20, "Doctor");
javaScript中在全局作用域定義的函數實際上只能被某個對象調用是什么意思?
慕桂英546537
2018-10-17 13:10:21