Div = document.getElementById("chat");
      chatDiv.scrollTop = chatDiv.scrollHeight;
    }

    window.onload = function() {
      connect();
      document.getElementById("input").focus();
    };

    document.addEventListener("keydown", function(event) {
      if (event.key === "Enter") {
        sendMessage();
      }
    });
  </script>
  <style>
    body {
      font-family: sans-serif;
      margin: 0;
      padding: 0;
      display: flex;
      flex-direction: column;
      align-items: center;
  