简体   繁体   English

如何使用Java脚本上传文件?

[英]How to upload file using java script?

I need to upload a file to the tomcat server from my html page, How can I do that? 我需要从html页面上载文件到tomcat服务器,该怎么做?
Basically give me a clean & simple idea and some samples? 基本上给我一个干净简单的想法和一些示例?
Searched a lot but can't understand this is totally new to me, am a bb app developer. 搜寻了很多,但不明白这对我来说是全新的,是BB应用程式开发人员。

For desinging used a form in that used input type = file and a button 对于使用所使用的输入类型= file和按钮的表单进行设计

I don't get an idea how to start with the functionality. 我不知道如何开始使用该功能。 Anyone plz help me? 有人帮助我吗?

You can't use js to upload anything. 您不能使用js上传任何内容。 You send the file to a php script that saves it. 您将文件发送到保存它的php脚本。

Check this. 检查一下。

http://www.tizag.com/phpT/fileupload.php http://www.tizag.com/phpT/fileupload.php

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM