/ Published in: JavaScript
Get Parameter from url query string
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getParameterByName(name) { var match = RegExp('[?&]' + name + '=([^&]*)').exec(window.location.search); return match && decodeURIComponent(match[1].replace(/\+/g, ' ')); } getParameterByName( "parameterName" )
URL: http://stackoverflow.com/questions/901115/how-can-i-get-query-string-values