Return to Snippet

Revision: 37091
at December 3, 2010 21:47 by mmstudio


Initial Code
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];
}

Initial URL

                                

Initial Description

                                

Initial Title
Get URL parameter

Initial Tags
url

Initial Language
JavaScript