/ Published in: JavaScript
Expand |
Embed | Plain Text
function gup( varname ) { varname = varname.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]"); var regexS = "[\\?&]"+varname+"=([^&#]*)"; var regex = new RegExp( regexS ); var results = regex.exec( window.location.href ); if( results == null ) return ""; else return results[1]; }
You need to login to post a comment.
