/ Published in: JavaScript
default.aspx?id=5
queryString('id') will return 5
Also this will convert to lower case. IIS / ASP.net is not case sensitive so my function isn't either.
queryString('id') will return 5
Also this will convert to lower case. IIS / ASP.net is not case sensitive so my function isn't either.
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
function queryString(ji) { ji = ji.toLowerCase(); hu = window.location.search.substring(1).toLowerCase(); gy = hu.split("&"); for (i=0;i<gy.length;i++) { ft = gy[i].split("="); if (ft[0] == ji) return ft[1]; } return ""; }