📜  创建您自己的查询选择器简写 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:02:43.878000             🧑  作者: Mango

代码示例1
const $ = document.querySelector.bind(document);
const $$ = document.querySelectorAll.bind(document);

const mainContent = $('.main-content');
const externalLinks = $$('a[target="_blank"]');