封装jquery的$方法

来源:互联网 发布:网络空间安全理事会 编辑:程序博客网 时间:2024/05/17 07:17
<!DOCTYPE html><html><head lang="en">    <meta charset="UTF-8">    <title>封装jquery的$方法</title></head><body><script>    window.$=HTMLElement.prototype.$=function(selector){        return (this==window?document:this).querySelectorAll(selector)    }</script></body></html>
1 0
原创粉丝点击