(function() {
let shouldScroll = false;
function scrollPage() {
if (shouldScroll) {
window.scrollBy(0, 50);
setTimeout(scrollPage, 10);
}
}
window.addEventListener('keydown', function(event) {
if (event.ctrlKey && event.key === '7') {
shouldScroll = true;
scrollPage();
} else if (event.ctrlKey && event.key === '8') {
// 停止滚轮滚动
shouldScroll = false;
// 开始读取标题
var ids = document.getElementsByClassName('mat-checkbox-label');
var idnum = [];
for(var i = 0; i
})();
我想不出还能有比这更简单的代码?