Created
February 15, 2014 17:43
-
-
Save vemarquez/9022579 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Lista