window.$ = HTMLElement.prototype.$ = function(selector){ return (this==window?document:this).querySelectorAll(selector); }
在原生dom中封装querySelectorAll
最新推荐文章于 2021-05-21 15:03:33 发布
window.$ = HTMLElement.prototype.$ = function(selector){ return (this==window?document:this).querySelectorAll(selector); }