A cópia do código é a seguinte: função getParameter (nome) { var reg = novo regexp ((^&) + nome + = ([^&]) (& $), i); var r = window.location.search.substr (1) .match (reg); if (r! = nulo) retornar UNESCAPE (r [2]); }