//jquery 原理 var $ = function (name) { return document.querySelector(name) } console.log($('#box')) var obj = { get() { console.log('你好') return this }, setName() { console.log('不好') return this }, }
//jquery 原理 var $ = function (name) { return document.querySelector(name) } console.log($('#box')) var obj = { get() { console.log('你好') return this }, setName() { console.log('不好') return this }, }