<BODY>
<input type=text id=text1 name=text1>
<input type=button id=button2 name=button2 value=download onClick="foo()">
<script>
function foo(){
window.open(text1.value);
}
</script></BODY>

解决方案 »

  1.   

    <object classid="clsid:8856F961-340A-11D0-A96B-00C04FD705A2" height=0 id=WB width=0></object>
    <input type=text id="URL" value="about:blank">
    <input type=button onclick="document.all.DownPage.src=document.all.URL.value;var parent=document.all.DownPage;parent.document.execCommand('SaveAs');">
    <br>
    <iframe src="http://digitaltitan/" id="DownPage">
    </ifame>
      

  2.   

    可以用这个下载本地的网页,图片资源..
    只能是下载本地的.不能跨域.
    如果要跨域的话,你可以用xmlhttp.<script>
    function getimg(url) {
    show.window.location.href=url;
    timer=setInterval(checkload,100)
    }
    function checkload(){
    if(show.readyState!="complete")
    {show.document.execCommand("SaveAs");
      clearInterval(timer)}
    }</script>
    <img src="aspplus2.gif">
    <input type=text name=url>
    <input type=button value="Down" onClick="getimg(document.all.url.value)">
    <iframe src="" name=show style="width:0;height:0"></iframe>
      

  3.   

    用xmlhttp实现的.下载文件资源..
    http://www.dnsasp.com/2939.html