/ Published in: JavaScript

Function enables the reading of url appended variables. See URL for more information.
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, ' ')); }
URL: http://gromitski.com/blog/get-variables-in-javascript/
Comments
