JSFiddle - React, Tailwind, and code Playground

by adamschwartz

HTML

<head>
<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.6.4/jquery.min.js"></script>
<script>
$(function(){
    $('#submit').click(function(){
        $.ajax({
            type: 'POST',
            url: $('form').attr('action'),
            data: {
                url: $('#url').val(),
                name: $('#custum-name').val()
            },
            success: function(data) {
                console.log(data.responseText);
            }
        });
    });
});
</script>
</head>
<body>
<form action="/generate">
<label for="url">URL</label>
<input id="url" type="text" />
<label for="custom-name">Custom Name</label>
<input id="custom-name" type="text" />
<input id="submit" type="submit" />
</form>
</body>