I trying to learn HTML by studying code from a downloaded web site. In the HTML code is the following snippet of Javascript. I am so new to Javascript and HTML and have no clue what this snippet is for. Any ideas?
function gID(name)
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.search );
if( results == null )
return "";
else
return results[1];
}