构造函数赋值
var Person = function () {
this.shopName = $('.underway-title')[0];
this.shopPrice = $('.underway')[0];
this.basics = $('.det-content');
this.detail = $('.laySpan_detail');
}
let demoMess = new Person()
(1) 创建一个新对象;
(2) 将构造函数的作用域赋给新对象(因此 this 就指向了这个新对象) ;
(3) 执行构造函数中的代码(为这个新对象添加属性) ;
(4) 返回新对象。