/ Published in: JavaScript
Get a value from a query string by supplying the parameter
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function getQueryStringByParam(ji) { hu = window.location.href; gy = hu.split("?"); for (i=0;i<gy.length;i++) { ft = gy[i].split("="); if (ft[0] == ji) { return ft[1]; } } }