jQuery and css

HTML

<!DOCTYPE html>
<html>
<head>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
$(document).ready(function(){
  $("button").click(function(){
    var txt = "";
    txt += "Dokument width/height: " + $(document).width();
    txt += "x" + $(document).height() + "\n";
    txt += "Okno width/height: " + $(window).width();
    txt += "x" + $(window).height();
    alert(txt);
  });
});
</script>
</head>
<body>

<button>Zobrazí rozměry dokumentu resp. okna prohlížeče</button>

</body>
</html>