JSFiddle - React, Tailwind, and code Playground

by keefies

HTML

<form method="post">
    <input type="RADIO" name="button" value="http://www.google.com" checked>this button goes to Google (Default)
    <BR>
    <input type="RADIO" name="button" value="http://www.yahoo.com">this button goes to Yahoo
    <BR>
    <input type="RADIO" name="button" value="http://www.stackoverflow.com">this button goes to StackOverflow
    <BR>
    <input type="submit" value="Continue">
</form>

JavaScript

$(function () {
    $("form").submit(function (e) {
        e.preventDefault();
        var url = $(this).find('input[type="radio"]:checked').val();
        window.open(url);

    });
});