【前端】我的刷题记录(3)
1、下面哪几个和 [http://store.company.com/dir/page.html]符合同源策略?(A)
A.http://store.company.com/dir2/other.htm
B.https://store.company.com/dir/secure.html
C.http://store.company.com:81/dir/etc.html
D.http://news.company.com/dir/other.html
2、关于DOMContentLoaded和load事件说法正确的是?(A)
A.DOMContentLoaded事件比load事件更早执行
B.load事件比DOMContentLoaded事件更早执行
C.按监听代码从上到下先后执行
D.dom文档完全加载完后执行load事件
3、如何在 div 容器里展示 <div></div> 这几个字符?(C)
A.<div><div></div></div>
B.<div>"<div></div>"</div>
C.document.querySelector('div').innerText = "<div></div>"
D.document.querySelector('div').innerHTML = "<div>sssssss</div>"
4、以下是哪一组全是块级元素?(B)
A.div i h2 li
B.div p h1 ul
C.li ul h3 span
D.p h4 canvas em
5、<div class="box box1 box2" style="color:#222">hello</div>,
这个div里面最终的字体颜色是什么?(C)
.box{
color:#999;
}
.box{
color:#333 !important;
}
.box2{
color:#666
}
A.#999
B.#222
C.#333
D.#666
6、以下不是box-sizing的属性是?(B)
A.border-box
B.auto
C.content-box
D.inherit
7、以下不是CSS伪类选择器的是?(C)
A.:first-child()
B.:before
C.:center
D.:after
8、'-1 >>> 32'的值为(D)
A.-1
B.1
C.0
D.2^32-1
9、[1 < 2 < 3, 3 < 2 < 1](A)
A.[true, true]
B.[true, false]
C.[false, true]
D.[false, false]
10、['1', '2', '3'].map(parseInt)(D)
A.[1, 2, 3]
B.[0, 1, 2]
C.[NaN, NaN, NaN]
D.[1, NaN, NaN]
11、
let a = { c:1 }
let b = a
a = 1
b.c = 2
a.c =?
(C)
A.1
B.2
C.undefined
D.NaN
12、console.log(1);
setTimeout(() => {console.log(2)}, 0);
console.log(3);
Promise.resolve(4).then(b => {
console.log(b);
});
console.log(5);
(B)
A.1 2 3 4 5
B.1 3 5 4 2
C.1 4 2 3 5
D.1 3 5 2 4
13、Math.abs(-6.666) 的结果是多少(D)
A.-6.666
B.6
C.-6
D.6.666
14、替换字符串 bilibili 替换字符串中所有的b变成大写B (B)
A.'bilibili'.delete('b', 'B')
B.'bilibili'.replace(/b/g, 'B')
C.'bilibili'.replace('b', 'B')
D.'bilibili'.toUpperCase()
15、[1,2,3,4,5] 的数组的基础上 删除第一个 和 最后一位(D)
A.[1,2,3,4,5].replace(1, -1)
B.[1,2,3,4,5].reverse(1,-1)
C.[1,2,3,4,5].toString(-1,1)
D.[1,2,3,4,5].slice(1, -1)
16、function setname(name){
** this.name = name**
}
setname.prototype.printName = function(){ console.log(this.name) }
let a = new setname("cc")
a.name = "dd"
a.proto.name = "ee"
a.proto.printName() // ?
a.printName() // ?
(A)
A.ee dd
B.cc dd
C.ee cc
D.ee Error
17、const players = [ {name: 'UZI', team: 'RNG', position: 'ADC'},
{name: 'theshy', team: 'IG', position: 'TOP'},
{name: 'Metoer', team: 'BLG', position: 'Jungle'},
{name: 'ADD', team: 'BLG', position: 'TOP'},
{name: 'Scout', team: 'EDG', position: 'Middle'},
{name: 'iBoy', team: 'EDG', position: 'ADC'},
{name: 'Baolan', team: 'IG', position: 'Support'},
{name: 'Xiaohu', team: 'RNG', position: 'Middle'}]
获取列表中战队名是BLG 位置上路的 选手对象?(A)
A.players.filter(x=> x.position === 'TOP' && x.team === 'BLG')
B.players.get(position='TOP', team='BLG')
C.players.find(position='TOP', team='BLG')
D.players.findOne(position='TOP', team='BLG')

浙公网安备 33010602011771号