JSFiddle - React, Tailwind, and code Playground

by mikea80

HTML

<form method="GET">
    <input type="text" name="a" value="one">
    <input type="text" name="b" value="two">
    <input type="text" name="c" value="three">
    <input type="submit">
</form>

JavaScript

$('body').on('submit', 'form', function (evt) {
    evt.preventDefault();
    alert($(this).serialize());
    //redirect to another url with querystring 
    //window.location = '?' + $(this).serialize();
    //or you can do a submit 
    //$(this).submit();
});