/ Published in: JavaScript
Expand |
Embed | Plain Text
/* Parse GET parameters (based on http://www.netlobo.com/url_query_string_javascript.html) */ function parseHttpGet(key){ key = key.replace(/[[]/,"\[").replace(/[]]/,"\]"); var regexS = "[\?&]"+key+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec(window.location.href); return ( results != null ? results[1] : false ); }
You need to login to post a comment.
