To get a URL parameter using javascript, we can use the following function:
function gup( name )
{
name = name.replace(/[\[]/,"\\\[").replace(/[\]]/,"\\\]");
var regexS = "[\\?&]"+name+"=([^&#]*)";
var regex = new RegExp( regexS );
var results = regex.exec( window.location.href );
if( results == null )
return "";
else
return results[1];
}
As explained here in netlobo.com
Subscrever:
Enviar feedback (Atom)
Sem comentários:
Enviar um comentário