JSFiddle - React, Tailwind, and code Playground

by Margus Martsepp

HTML

<h2>Export Your Goods To <span id="location"></span></h2>

JavaScript

function getParameterByName(name) {
    name = name.replace(/[\[]/, "\\[").replace(/[\]]/, "\\]");
    var regex = new RegExp("[\\?&]" + name + "=([^&#]*)"),
        results = regex.exec(location.search);
    return results == null ? "" : decodeURIComponent(results[1].replace(/\+/g, " "));
}
var value = getParameterByName('v');
$("#location").text(value);