Skip to content

raravel/params

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 

Repository files navigation

PARAMS

This script parses the Query String very simply.

Install

Just add script file in html file.


Basic

<html doctype>
    <head>
        <!-- load css -->

        <!-- load script -->
        <script src="params.js"></script>
    </head>
    <body>
    </body>
</html>

CDN

<script src="https://cdn.jsdelivr.net/gh/raravel/params/params.js"></script>

Usage

Can access location.params JSON Object

// http://localhost:3000/?hello=world
console.log(location.params);
// --> { hello: "world" }

And decoding URI automatically.

// http://localhost:3000/?decode=%27%EC%95%88%EB%85%95%ED%95%98%EC%84%B8%EC%9A%94%27
console.log(location.params);
// --> { decode: "'안녕하세요'" }

About

Javascript GET Search Query to JSON

Resources

Stars

Watchers

Forks

Packages

No packages published