1.0.6 • Published 5 years ago

@yaff/formax v1.0.6

Weekly downloads
-
License
MIT
Repository
github
Last release
5 years ago

Formax

Submit Forms with Ajax

index.html

<html>
<head>
    <script defer src="//unpkg.com/formax"></script>
    <script defer src="main.js"></script>
</head>
<body>
    <form id="getDog" action="https://dog.ceo/api/breeds/image/random" method="GET">
            <button>Get Dogs</button>
    </form>
</body>
</html>

main.js

registerForm("form#getDog", async res => {
  console.log(await res.json());
});