UNPKG

jessquery

Version:

Modern JavaScript is pretty good, but typing document.querySelector() is a pain. This is a tiny library that makes DOM manipulation easy. jQuery is around 80kb (30kb gzipped), while this is only around 8kb (3.5kb gzipped). Lots of JSDoc comments so it's s

32 lines (29 loc) 809 B
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Test send Function</title> </head> <body> <form action="http://localhost:3000" id="myForm"> <input id="butt" type="text" name="title" value="It gets the URL from the action attribute" /> <textarea name="body">This was automatically serialized.</textarea> <button id="submitButton">Submit</button> </form> <script type="module"> import { $, $$ } from "../index.js" $("#submitButton").on("click", async (event) => { $("#myForm").send({ event, json: true, }) }) </script> </body> </html>