360校园招聘笔试题

综合知识·前端工程师 · 历年真题改编 · 题号 40814
单选题综合知识前端工程师难度 3真题改编 · 2023中大厂

题目

以下代码执行后输出结果为( )? content const $ = document.querySelector.bind(document); const box1 = $('#box1'); const box2 = $('#box2'); box1.addEventListener('click', () => { console.log('box1 true'); }, true); box1.addEventListener('click', () => { console.log('box1 false'); }, false); box2.addEventListener('click', () => { console.log('box2 true'); }, true); box2.addEventListener('click', () => { console.log('box2 false'); }, false);

选项4 个

Abox1 true, box2 true, box2 false, box1 false
Bbox1 true, box2 false, box1 false, box2 true
Cbox2 false, box2 true, box1 false, box1 true
Dbox1 true, box1 false, box2 true, box2 false
🔒 答案与解析:登录后可查看本题答案、解析与考点讲解,并可在线作答自动判分 登录 / 注册
‹ 上一题 全部专题 下一题 ›

同类型题目综合知识·前端工程师 · 继续练习

题目免费浏览 · 整套练习与模拟考登录后开始 · 答案与解析登录后可见