<div id="scr"style="height:15%;overflow:scroll;">
<p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p><p>ds</p>
<script>
// document.addEventListener('keydown', function(event) {
// console.log(event)
// });
let speed = 100
let sid = document.getElementById("scr")
document.addEventListener('keydown', function(event) {
//console.log(event)
if(event.key == "ArrowUp"){
sid.scrollBy(0,-speed)
}
if(event.key == "ArrowDown"){
sid.scrollBy(0,speed)
}
});
</script>
<button>OK</button> на <button onclick="obr()">OK</button>
(function() {code}()) на function obr(){}
<button type="button" data-id="about" class="js-item-link is-active">
<span>Дата</span>
</button>
<button type="button" data-id="works" class="js-item-link">
<span>Время</span>
<span>13:00 (МСК)</span>
</button>
</div>
<div class="modal-buy-card__tab-container">
<div class="tab_content is-active" id="about">
<input class="modal-buy-card__date-calendar flatpickr flatpickr-input active" type="text" readonly="readonly">
<div>
<button>отмена</button>
<button onclick="obr()">OK</button>
</div>
</div>
<div class="tab_content" id="works">
<p>Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works WorWorks Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works Works</p>
</div>
</div>
<script type="text/javascript">
function obr(){
alert("проверка кнопки!_!")
let tabMenus = document.querySelectorAll('.js-item-link');
let tabContents = document.querySelectorAll('.tab_content');
for (var i = 0; i < tabMenus.length; i++) {
tabMenus[i].addEventListener('click', function(e) {
e.preventDefault();
for (var i = 0; i < tabMenus.length; i++) {
tabMenus[i].className = 'js-item-link';
}
this.className = 'js-item-link is-active';
for (var i = 0; i < tabContents.length; i++) {
tabContents[i].className = 'tab_content';
}
document.getElementById(this.dataset.id).className = 'tab_content is-active';
});
}
};
</script>
<!DOCTYPE html>
<html lang="en" dir="ltr">
<head>
<meta charset="utf-8">
<title></title>
</head>
<body>
<input class="button" type="button" value="Регистрация">
</body>
<style media="screen">
//стиль кнопки
.button{
padding:2%;
background:#cc0000;
border:1px solid blue;
font-size:120%;
color:white;
/*background-img:url(photo.png);*/
}
</style>
</html>
<div><img onclick="obr()" src="photo_button.png"></div>
<!DOCTYPE html>
<html>
<head>
<title></title>
</head>
<body>
<input id="x1"><br>
<input id="x2">
<button onclick="obr()">add</button>
</body>
<script type="text/javascript">
var arr = [];
function obr(){
var x1 = document.getElementById("x1").value;
var x2 = document.getElementById("x2").value;
arr.push(x1*x2);
console.log(arr)
}
</script>
</html>