Here is the source code for the store form

<html>
<head>
</head>

<body>
    <form method="GET" action="./form-result.html" >
        <div>
            <input type="checkbox" name="product1" value="Product 1" />
            <span>Product 1</span>
        </div>
        <div>
            <input type="checkbox" name="product2" value="Product 2" />
            <span>Product 2</span>
        </div>
        <div>
            <input type="checkbox" name="product3" value="Product 3" />
            <span>Product 2</span>
        </div>
        <input type="submit" value="Purchase">
    </form>
</body>
</html>

Here is the source code for the form result

<!doctype html>

<html>
<head>
<script type="text/javascript">
function getSearchObject() {
    if (location.search === "") return {};

    var o = {};
    var nvPairs = location.search.substr(1).replace(/\+/g, " ").split("&");

    nvPairs.forEach( function (pair) {
        var e = pair.indexOf('=');
        var n = decodeURIComponent(e < 0 ? pair : pair.substr(0,e));
        var v = (e < 0 || e + 1 == pair.length) 
                ? null : 
                decodeURIComponent(pair.substr(e + 1,pair.length - e));
        if (!(n in o))
            o[n] = v;
        else if (o[n] instanceof Array)
            o[n].push(v);
        else
            o[n] = [o[n] , v];
            
    });
    return o;
}
</script>
</head>

<body>

You have bought:
<ul id="boughtItems">
</ul>

<script>
var getValues = getSearchObject();
for(var key in getValues) {
    var node = document.createElement("li");
    var value = document.createTextNode(getValues[key]);
    node.appendChild(value);
    document.getElementById("boughtItems").appendChild(node)
}

</script>

</body>
</html>