Set & Get Query Parameters In URL – hashparser

Category: Javascript | April 6, 2021
Views Total:93 views
Official Page:Go to website
Last Update:April 6, 2021


Set & Get Query Parameters In URL – hashparser


hashparser is a super tiny JavaScript library that helps you handle (set/get) query parameters in the URL.

How to use it:

1. Include the hashparser’s JavaScript on the page.

<script src="dist/hashparser.min.js"></script>

2. Append query parameters to the current URL.

HashParser.setParameter('css', 'script');

3. Determine whether to encode the query parameter value.

HashParser.setParameter(‘css’, ‘script’, true);


4. It supports any type of data in the hash.

var example = {
    "css": "script"
HashParser.setParameter('example', greeting, true);

5. Get the encoded value of a query parameter.

var getPara = HashParser.getParameter('css', true);

You Might Be Interested In:

Leave a Reply