window.$ = HTMLElement.prototype.$ = function(selector){ return (this==window?document:this).querySelectorAll(selector); }
在原生dom中封装querySelectorAll
最新推荐文章于 2023-01-13 09:35:47 发布
window.$ = HTMLElement.prototype.$ = function(selector){ return (this==window?document:this).querySelectorAll(selector); }