<input type="number" class="qw">
<input type="number" class="qw1">
<button>Go</button>
<div class="out"></div>
let out = document.querySelector('.out');
const button = document.querySelector('button');
button.onclick = function () {
let number1 = document.querySelector('.qw').value;
let number2 = document.querySelector('.qw1').value;
if (number1 > number2) {
out.innerHTML = number1;
} else if (number2 > number1) {
out.innerHTML = number2;
} else {
out.innerHTML = "равны";
}
}
console.log("2" > "11"); //true
console.log(2 > 11); //false
const number1 = parseInt(document.querySelector('.qw').value);
const number2 = parseInt(document.querySelector('.qw1').value);