<script>
function random(){
let randomT = Math.ceil(Math.random() * 10);
let randomNumber = document.getElementById('randomNumber');
randomNumber.innerHTML = randomT;
let number = document.getElementById('number').value;
let win = document.getElementById('win');
console.log(number, randomT)
if(number == randomT){
win.innerHTML = 'Правильно'
}else{
win.innerHTML = 'Не правильно'
}
}
</script>
<body>
<div id="randomNumber"></div><br>
<input type="text" id='number' value=""><br>
<button onclick="random()">Click</button>
<br><br>
<h1 id="win"></h1>
</body>
поправил