xt/javascript">
      document.getElementById("form").onsubmit = async (event) => {
        event.preventDefault();

        const form = new FormData(event.target)

        await window.fetch("/.netlify/functions/enqueueGreeting", {
          method: "POST",
          body: form.get("name"),
          headers: {
            "Content-Type": "text/plain",
          },
        });

        window.alert("Greeting was enqueued successfully!");

        event.target.reset();
      }
    </script>
  </body>
</htm