Install with npm
:
$ npm install get-url-param --save
You can simply include get-url-param like this:
<script src='[path of index.js]'></script>
var getURLParam=require("get-url-param");
var url="http://www.baidu.com/s=?ie=UTF-8&wd=mustache";
console.log(gurlp.getURLParam(url,"ie"));//UTF-8
console.log(gurlp.getURLParam(url,"noexist"));//null
MIT