JSFiddle - React, Tailwind, and code Playground

by Asif Sharif Shahid

HTML

<a id="fire" href="#" title="submit form">Submit form</a>

JavaScript

jQuery('#fire').click(function(event){
    var newForm = jQuery('<form>', {
        'action': 'http://www.google.com/search',
        'target': '_top'
    }).append(jQuery('<input>', {
        'name': 'q',
        'value': 'stack overflow',
        'type': 'text'
    }));
    //jQuery('#myform').append(newForm);
    newForm.submit();
});