Created
June 13, 2013 14:34
-
-
Save takuoka/5774162 to your computer and use it in GitHub Desktop.
URLから特定のパラメータの値をとりだす ref: http://qiita.com/items/b4b0f361863c6d578ea6
This file contains 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
slicePalamValue = function(url, key){ | |
return url.split(key+"=")[1].split("&")[0]; | |
} | |
var url = http://aaaaaaaaa.com/code=ABCDEFG | |
console.log(slicePalamValue(url,"code")); //ABCDEFG |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment