上传和下载管理器 [英] upload and download manager

查看:64
本文介绍了上传和下载管理器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述





我想要一个Java代码将文件上传到服务器,然后从同一台服务器下载文件。我将使用JSP上传/下载选项。



问候,



Pratyush

解决方案

在这里:

使用Java上传和下载文件 [ ^ ]


 < ;  !DOCTYPE     html  >  
< html >
< head >
< meta http-equiv = 内容类型 内容 = text / html; charset = UTF-8 >
< title > 上传页面< / title >
< / head >
< < span class =code-leadattribute> body >
< script >
function myFunction()
{
var x = document.getElementById(myFile)。name;
document.getElementById(demo)。innerHTML = x;
}

< / script >

< 表格 > 选择要上传的文件:
< ; p id < span class =code-keyword> = demo > < / p >
< span class =code-keyword>< input type = file 名称 = filename id = myFile / >
< 输入 type = save 名称 = savename id = 保存文件 / >
< / form & gt;
< / body >
< / html >


Hi,

I want a Java code to upload a file to the server and then download the file from the same server. I will use JSP for upload/download option.

Regards,

Pratyush

解决方案

Here you go:
File Upload and Download using Java[^]


<!DOCTYPE html>
<html>
    <head>
        <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        <title>Uploading page</title>
    </head>
    <body>
    <script>
        function myFunction()
        {
            var x = document.getElementById("myFile").name;
            document.getElementById("demo").innerHTML=x;
        }

    </script>

    <form> Select a file  to upload:
        <p id="demo"></p>
        <input type="file" name="filename" id="myFile"/>
        <input type="save" name="savename" id="save file"/>
     </form>
    </body>
</html>


这篇关于上传和下载管理器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆