所以,我需要根据输入的代码创建一个重定向系统。目前我有:
<form id="form1" name="form1" method="post" action="">
<pre> <input type="text" name="meow" id="meow" /> <input type="submit" name="submit" id="submit" value="Submit" onclick="javascript:window.location.href('http://foo.exaple.com/bar/' + document.getElementById("meow").value + '.zip')"/>
基本上,我需要上面的脚本根据在文本框中输入的代码在 foo.example.com/bar/ 中下载一个 zip 文件。
当我在文本框 meow 中输入代码“ugh”并单击提交时,我想在http://foo.example.com/bar/ugh.zip下载文件
我怎样才能做到这一点?