Last active
December 17, 2015 09:58
-
-
Save hrkd/5590734 to your computer and use it in GitHub Desktop.
GETパラメータ取得
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| location.__proto__.getParm = (function(){ | |
| if(this.search){ | |
| var query = []; | |
| var tmpQ = []; | |
| query = location.search.replace("?","").split("&"); | |
| for(var i=0;i<query.length;i++){ | |
| tmpQ[query[i].split("=")[0]] = query[i].split("=")[1]; | |
| } | |
| return tmpQ ? tmpQ : undefined; | |
| }else{ | |
| return undefined; | |
| } | |
| })(); | |
| //location.getParm["foo"]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment