Created
April 1, 2016 07:13
-
-
Save lgh06/68ca0c8f956c55e1ff5bf818f86ab5a3 to your computer and use it in GitHub Desktop.
getQueryStringByName
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
function getQueryStringByName(name){ | |
var result = location.search.match(new RegExp("[\?\&]" + name+ "=([^\&]+)","i")); | |
if(result == null || result.length < 1){ | |
return ""; | |
} | |
return result[1]; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment