blog.hugopoi.net/www/.content.EZtzwPjb/html/24a5c0f2a28bafee305b9df2cf4b5e2fe6213aaa.00000839.html

55 lines
1.2 KiB
HTML
Raw Normal View History

<html>
<head>
<script type="text/javascript">
function getUrlVars()
{
var vars = [], hash;
var hashes = window.location.href.slice(window.location.href.indexOf('?') + 1).split('&');
for(var i = 0; i < hashes.length; i++)
{
hash = hashes[i].split('=');
vars.push(hash[0]);
vars[hash[0]] = hash[1];
}
return vars;
}
function openWithPostDatav2(page,data)
{
var form = document.createElement('form');
form.setAttribute('action', page);
form.setAttribute('method', 'post');
for (var n in data)
{
var inputvar = document.createElement('input');
inputvar.setAttribute('type', 'hidden');
inputvar.setAttribute('name', n);
inputvar.setAttribute('value', data[n]);
form.appendChild(inputvar);
}
document.body.appendChild(form);
form.submit();
}
function launch(){
var urlvars = getUrlVars();
var formdata = [];
for (var varname in urlvars)
{
if(varname != 'urlserverpage'){
formdata[varname] = urlvars[varname];
}
}
openWithPostDatav2(urlvars['urlserverpage'],formdata);
}
</script>
<title>Script</title>
</head>
<body OnLoad="launch();">
</body>
</html>