var formData = function() {
    var query_string = (location.search) ? ((location.search.indexOf(‘#’) != -1) ? location.search.substring(1, location.search.indexOf(‘#’)) : location.search.substring(1)) : ”;
    var elements = [];
    if(query_string) {
       var pairs = query_string.split(“&”);
       for(i in pairs) {
          if (typeof pairs[i] == ‘string’) {
              var tmp = pairs[i].split(“=”);
              elements[unescape(tmp[0])] = unescape(tmp[1]);
          }
       }
    }
    return {
        display: function(key) {
            if(elements[key]) {
              document.write(elements[key]);
            } else {
              document.write(““);
            }
        }   
    }
}();
   
   

Welcome formData.display(“name”).

This is to confirm your form submission.

Check your email, you’ll recieve an email explaining the steps to follow.

Happy reading.