ws/guess`);
    ws.onopen = function(e) {
        submitButton.disabled = false;
    };
    ws.onclose = ws.onerror = function(e) {
        submitButton.disabled = true;
    };
    ws.onmessage = function(e) {
        console.log(e.data);
        serverResp.innerText = e.data;
    };
}

theForm.addEventListener("submit", async (e) => {
    e.preventDefault();

    let form = e.currentTarget;
    let url = form.action;

    ws.send(userText.value);
});

</script>
</body>
</html>
