/ Published in: JavaScript
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
<script> function getQueryVariable(variable) { var query = self.location.search.substring(1); var vars = query.split("&"); for (var i=0;i<vars.length;i++) { var pair = vars[i].split("="); if (pair[0] == variable) { if( variable == 'swf'){ salida = new String(pair[1]); salida2 = salida.substr(0,salida.length-4); }else{ salida2 = pair[1]; } return salida2; } } } document.write(getQueryVariable('variableGET').toString()) </script>