Skip to content

Instantly share code, notes, and snippets.

@vemarquez
Created February 15, 2014 17:43
Show Gist options
  • Save vemarquez/9022579 to your computer and use it in GitHub Desktop.
Save vemarquez/9022579 to your computer and use it in GitHub Desktop.
function LeeParametros(pCantidadParametros)
{
var query = window.location.search.substring(1);
var parms = query.split("&");
var qsl = new Array(pCantidadParametros);
for (var i=0; i<parms.length; i++) {
var pos = parms[i].indexOf("=");
if (pos > 0)
{
var key = parms[i].substring(0,pos);
var val = parms[i].substring(pos+1);
qsl[key] = val;
}
}
return (qsl);
}
function replaceAll(find, replace, str)
{
while( str.indexOf(find) > -1)
{
str = str.replace(find, replace);
}
return str;
}
@vemarquez
Copy link
Author

lista

@vemarquez
Copy link
Author

Lista

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment